diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml deleted file mode 100644 index 8445f2c9..00000000 --- a/.github/workflows/cd.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: CD - -on: - push: - branches: - '*' - tags: - # This excludes tags from CD, as they should be published through a release. - '!v*' - -env: - CI: true -jobs: - publish-npm: - runs-on: ubuntu-22.04 - if: ${{ github.actor != 'dependabot[bot]' }} - steps: - - uses: actions/checkout@v4 - - name: Prepare for publication to npm - uses: actions/setup-node@v3 - with: - node-version: '18.x' - registry-url: 'https://registry.npmjs.org' - scope: '@inrupt' - - name: Determine npm tag - # Remove non-alphanumeric characters - # See https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable - run: echo "TAG_SLUG=$(echo ${GITHUB_REF#refs/heads/} | tr -cd '[:alnum:]-')" >> $GITHUB_ENV - - run: npm ci - - name: Prepare prerelease version - run: | - git config user.name $GITHUB_ACTOR - git config user.email gh-actions-${GITHUB_ACTOR}@github.com - # Make sure the prerelease is tagged with the branch name, and that they are sorted by build: - npm version prerelease --preid=$TAG_SLUG-$GITHUB_RUN_ID-$GITHUB_RUN_NUMBER - - name: Publish an npm tag for this branch - run: npm publish --access public --tag "$TAG_SLUG" - env: - NODE_AUTH_TOKEN: ${{ secrets.INRUPT_NPM_TOKEN }} - - run: | - echo "Package published. To install, run:" - echo "" - echo " npm install @inrupt/solid-common-vocab@$TAG_SLUG" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fd601a3f..8e8f80da 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,10 @@ jobs: - name: Node setup uses: actions/setup-node@v3 with: - node-version: '16' + node-version-file: ".nvmrc" registry-url: 'https://registry.npmjs.org' scope: '@inrupt' + cache: 'npm' - name: NPM install, test and publish run: | npm install diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..3c032078 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18