From 5ed29daf63b85a060f270924d68b2adbec4e14cf Mon Sep 17 00:00:00 2001 From: Yutaka Kamei Date: Tue, 9 Apr 2024 15:30:08 +0900 Subject: [PATCH] Add release.yml --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..857eb93 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: Release +on: + workflow_dispatch: + inputs: + version: + description: version. The next release version (without prefix v) + required: true +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.RPP_ID }} + private-key: ${{ secrets.PRIVATE_KEY }} + + - uses: actions/checkout@v4 + with: + token: ${{ steps.app-token.outputs.token }} + + - uses: actions/setup-node@v4 + with: + node-version: "20" + check-latest: true + cache: npm + + - run: npm ci + - name: Bump the package version + run: | + mv package.json /tmp/ + jq '.version = "${{ github.event.inputs.version }}"' /tmp/package.json | tee package.json + npm i --package-lock-only + + - uses: yykamei/actions-git-push@main + with: + commit-message: Bump to ${{ github.event.inputs.version }} + + - uses: yykamei/actions-release-actions@main + with: + tag: v${{ github.event.inputs.version }} + apply: true