mirror of
https://github.com/semaphore-protocol/semaphore.git
synced 2026-01-08 22:28:08 -05:00
* fix(ci): publish pkg if no releases yet * chore(ci): add workflow release trigger * fix: workflow dispatch instead of workflow release
56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
name: release
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install soldeer
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: soldeer
|
|
- name: Store soldeer login credential
|
|
env:
|
|
SOLDEER_TOKEN: ${{ secrets.SOLDEER_TOKEN }}
|
|
run: |
|
|
echo "$SOLDEER_TOKEN" > "$GITHUB_WORKSPACE"/soldeer_login
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: yarn
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
- name: Authentication
|
|
run: |
|
|
echo npmAuthToken: "$NODE_AUTH_TOKEN" >> ./.yarnrc.yml
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- name: Install dependencies
|
|
run: yarn
|
|
|
|
- name: Publish packages
|
|
run: yarn version:publish
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
SOLDEER_LOGIN_FILE: ${{ github.workspace }}/soldeer_login
|
|
|
|
- run: yarn version:release
|
|
env:
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|