Skip to content

Release 0.2.0

Release 0.2.0 #70

Workflow file for this run

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 == 'fulfillmenttools: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@v4
- name: Set up node
uses: actions/setup-node@v4
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: Building
run: npm run build
- name: Publish npm package
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 GH release
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564
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 }}