Skip to content

Commit

Permalink
Add release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yykamei committed Apr 9, 2024
1 parent e9f02fb commit 5ed29da
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5ed29da

Please sign in to comment.