Skip to content

fix: prerelease (#39) #83

fix: prerelease (#39)

fix: prerelease (#39) #83

Workflow file for this run

name: Release
on:
push:
branches:
- main
- beta
- alpha
- dev
- rc
pull_request:
branches:
- "*"
jobs:
test-and-build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for semantic-release
- name: Use Node.js {{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org/"
- run: npm ci
# - run: npm run test
publish:
permissions:
contents: write
pull-requests: write
issues: write
packages: write
needs: [test-and-build]
runs-on: ubuntu-latest
if: |
github.event_name == 'push' &&
(
github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/beta' ||
github.ref == 'refs/heads/alpha' ||
github.ref == 'refs/heads/dev' ||
github.ref == 'refs/heads/rc'
)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for semantic-release
- name: Use Node.js {{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org/"
- run: npm ci
- run: npm run build
- name: Setup Git identity
run: |
git config user.name "semantic-release-bot"
git config user.email "[email protected]"
- name: Run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}