forked from dfinity/agent-js
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.87 KB
/
prepare-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Prepare Release
on:
workflow_dispatch:
inputs:
semverBump:
description: 'Specify next SemVer version (either of: "patch", "minor", "major", "prepatch", "preminor", "premajor", or custom SemVer compatible version (e.g. "0.32.1-beta.1", or "1.0.0"))'
type: string
required: true
default: 'patch'
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: npm list
- name: Install node dependencies
run: npm ci
- name: Set up git config
run: |
git config author.email "${{ github.event.sender.id }}+${{ github.event.sender.login }}@users.noreply.github.com"
git config author.name "${{ github.event.sender.login }}"
git config committer.email "41898282+github-actions[bot]@users.noreply.github.com"
git config committer.name "GitHub Actions Bot"
git config user.email "${{ github.event.sender.id }}+${{ github.event.sender.login }}@users.noreply.github.com"
git config user.name "${{ github.event.sender.login }}"
- name: Create release Pull request & GitHub Release
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: npm run release ${{ inputs.semverBump }}