fix: token #11
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: Push | |
on: [push] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use latest Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
cache: 'npm' | |
- name: Install packages | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Typecheck | |
run: npm run type:check | |
# - name: Test | |
# run: npm run test | |
# - name: Check if we have up-to-date specifications | |
# run: npm run generate:check | |
- name: Build | |
run: npm run build | |
- name: Create Canary release | |
if: github.ref != 'refs/heads/main' | |
env: | |
GH_TOKEN: ${{ secrets.CELTRA_DEPLOYER_GITHUB_TOKEN }} | |
PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.CELTRA_DEPLOYER_GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPMJS_WRITE_TOKEN }} | |
run: npm run canary | |
- name: Prepare repository | |
if: github.ref == 'refs/heads/main' | |
run: git fetch --unshallow --tags | |
- name: Create release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GH_TOKEN: ${{ secrets.CELTRA_DEPLOYER_GITHUB_TOKEN }} | |
PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.CELTRA_DEPLOYER_GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPMJS_WRITE_TOKEN }} | |
run: npm run release |