-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (41 loc) · 1.24 KB
/
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
48
49
50
name: Release
on:
workflow_dispatch:
inputs:
newversion:
description: 'npm version {major,minor,patch,premajor,preminor,prepatch,prerelease}'
required: true
permissions:
contents: write
jobs:
version_and_release:
runs-on: ubuntu-latest
steps:
- name: 'Generate token'
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: 'Checking out code'
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}
- name: 'Setting up Node'
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: 'Install Node Dependencies'
run: npm ci
- name: 'Build'
run: npm run build
- name: 'Test'
run: npm test
- name: 'git config'
run: git config --global user.email "[email protected]" && git config --global user.name "wrankles"
- name: 'Create Release'
run: npm run release -- ${{ github.event.inputs.newversion }}
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}