Skip to content

chore: release v0.0.45 #34

chore: release v0.0.45

chore: release v0.0.45 #34

Workflow file for this run

name: Publish
on:
push:
tags:
- "**"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
outputs:
artifacts: ${{ steps.collect.outputs.artifacts }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "npm"
node-version-file: .nvmrc
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- uses: actions/upload-artifact@v4
if: success()
with:
name: latest
path: dist
- name: Collect artifacts
if: success()
id: collect
run: |
echo "artifacts=$(ls dist | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
publish:
name: Publish
needs: build
permissions: write-all
runs-on: ubuntu-latest
strategy:
matrix:
artifact: ${{fromJson(needs.build.outputs.artifacts)}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "npm"
node-version-file: .nvmrc
registry-url: https://registry.npmjs.org/
- uses: actions/download-artifact@v4
with:
name: latest
path: dist
- name: Configure git
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Configure npm
run: npm config set //registry.npmjs.org/:_authToken ${{secrets.WCP_NPM_TOKEN}}
- name: Publish package
working-directory: dist/${{matrix.artifact}}
run: npx release-it --no-git --no-github.release --no-increment --ci
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.WCP_NPM_TOKEN}}