Skip to content

Merge pull request #25 from bruceharrison1984/v0.0.7-fix8 #18

Merge pull request #25 from bruceharrison1984/v0.0.7-fix8

Merge pull request #25 from bruceharrison1984/v0.0.7-fix8 #18

Workflow file for this run

name: Release Build
on:
push:
tags:
- "v*.*.*"
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
pull-requests: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Release Version
id: getReleaseVersion
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/v}
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
- name: Update NPM
run: npm install -g npm
- name: NPM Install
run: npm ci --ignore-scripts
- name: Test
run: npm run test
- name: Build
run: npm run build
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: bcrypt-edge-package
path: |
./dist
LICENSE
package.json
README.md
- name: Publish to NPM
run: npm publish --access public --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}
## finalizing the release doesn't depend on Docs deploying because it fails frequently
finalize-release:
runs-on: ubuntu-latest
needs: build
steps:
## Checkout so we can apply the new tag
- uses: actions/checkout@v4
with:
fetch-depth: "0"
## Documentation: https://github.com/marvinpinto/action-automatic-releases
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false