From 4d2367ac64aa68bb6c56628219879e4b6c4f9c59 Mon Sep 17 00:00:00 2001 From: homura Date: Thu, 3 Aug 2023 15:33:22 +0800 Subject: [PATCH] chore: canary release for ckb2023 --- .github/workflows/canary-ckb2023.yml | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/canary-ckb2023.yml diff --git a/.github/workflows/canary-ckb2023.yml b/.github/workflows/canary-ckb2023.yml new file mode 100644 index 000000000..de55c42a8 --- /dev/null +++ b/.github/workflows/canary-ckb2023.yml @@ -0,0 +1,48 @@ +name: Canary-CKB2023 +on: + push: + branches: + - ckb2023 + +permissions: + contents: write + +jobs: + canary: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Install dependencies + uses: ./.github/actions/install-deps + + - name: Setup .npmrc file + uses: actions/setup-node@v3 + with: + registry-url: "https://registry.npmjs.org" + + - name: Canary release + run: | + npx changeset pre exit || true + npx changeset version --snapshot ckb2023-$(git log -1 --pretty=format:%h) + pnpm -r publish --no-git-checks --tag ckb2023 + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate commit comment + id: commit-comment + run: | + result="$(node scripts/canary-commit-comment.cjs)" + delimiter="$(openssl rand -hex 8)" + echo "result<<$delimiter" >> $GITHUB_OUTPUT + echo "$result" >> $GITHUB_OUTPUT + echo "$delimiter" >> $GITHUB_OUTPUT + + - name: Create commit comment + uses: peter-evans/commit-comment@v2 + with: + body: ${{ steps.commit-comment.outputs.result }} + token: ${{ secrets.GITHUB_TOKEN }}