Skip to content

4.0.0-rc.6

4.0.0-rc.6 #7

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Compare version in package.json with Git tag
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
TAG_VERSION=${{ github.event.release.tag_name }}
if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then
echo "Version in package.json ($PACKAGE_VERSION) does not match the Git tag ($TAG_VERSION)"
exit 1
fi
- name: Install dependencies in CI flow
run: npm ci
- name: Run tests
run: npm test
- name: Build
run: npm run build
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Archive production artifacts
run:
zip -r disableautofill-${{ github.event.release.tag_name }}.zip dist/
- name: Upload dist to Release
uses: softprops/action-gh-release@v1
with:
files: disableautofill-${{ github.event.release.tag_name }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}