release: [email protected], [email protected], [email protected], time@… #103
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }} | |
env: | |
TERM: linux | |
FORCE_COLOR: 1 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- name: Restore | |
run: npm ci | |
- name: Build | |
run: | | |
set -e | |
npm run build | |
npx @werk/cli publish --no-build --to-archive | |
- name: Test | |
run: | | |
set -e | |
npm run lint -- --max-warnings=0 | |
npx @werk/cli vitest run --no-build | |
npx @werk/cli depcheck | |
- name: Publish | |
run: | | |
npm config set //registry.npmjs.org/:_authToken '${NPM_TOKEN}' | |
npx @werk/cli publish --from-archive | |
env: | |
NPM_TOKEN: ${{secrets.NPM_TOKEN}} |