release and publish #2646
This file contains hidden or 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 | |
| run-name: release and publish | |
| on: | |
| schedule: | |
| - cron: '30 0,6,12,18 * * *' | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: 'main' | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Set git config | |
| run: | | |
| git config --local user.name "Tom Gao" | |
| git config --local user.email "tom@tomgao.cc" | |
| - run: pnpm install | |
| - run: pnpm download | |
| - run: pnpm release | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Push changes | |
| if: env.ELECTRON_EXTENSION_RELEASE == 1 | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: 'main' | |
| tags: true |