Merge pull request #137 from zenn-dev/canary #25
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: VSCode拡張をリリースする | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "pnpm" | |
| - name: Install safe-chain | |
| run: curl -fsSL https://raw.githubusercontent.com/AikidoSec/safe-chain/main/install-scripts/install-safe-chain.sh | sh -s -- --ci | |
| env: | |
| SAFE_CHAIN_VERSION: "1.2.1" | |
| - name: node_modules をインストール | |
| run: pnpm install | |
| - name: VSCode拡張をリリース | |
| run: pnpm run publish:vsce | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
| - name: git に user 情報を設定 | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: canary へチェックアウト | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: canary | |
| - name: main ブランチの変更を canary ブランチに反映 | |
| run: | | |
| git config pull.rebase false | |
| git pull --allow-unrelated-histories origin main | |
| git push origin HEAD |