Prepare release 0.0.17 #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- 'main' | |
workflow_dispatch: | |
jobs: | |
publish: | |
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && github.event.pull_request.head.label == 'arnoerpenbeck:release') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
registry-url: 'https://registry.npmjs.org' | |
node-version-file: '.nvmrc' | |
cache: "npm" | |
cache-dependency-path: package-lock.json | |
- name: Set npm credentials | |
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN | |
- name: Install dependencies | |
run: npm ci --ignore-scripts --progress=false --fund=false --fetch-retries=5 | |
- name: Publish | |
run: npm publish --access public | |
- name: Determine new version | |
id: version | |
run: | | |
NEW_VERSION="$(cat package.json | jq -r '.version')" | |
echo "release-version=${NEW_VERSION}" >> $GITHUB_OUTPUT | |
- name: Create Release | |
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: ${{ steps.version.outputs.release-version }} | |
name: ${{ steps.version.outputs.release-version }} | |
draft: false | |
prerelease: false | |
body: | | |
Released the project to production with tag ${{ steps.version.outputs.release-version }} | |