-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (51 loc) · 1.67 KB
/
publishTypes.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
51
52
53
54
55
56
57
58
59
# Very important!
# Make sure that the github token has read AND WRITE access on github.
# 1. hit https://github.com/seatsio/[REPO]/settings/actions
# 2. under "Workflow permissions", make sure "Read and write permissions" is checked instead of the (default?) read only.
name: 'Update and publish @seatsio/seatsio-types'
on:
workflow_dispatch:
inputs:
version:
description: 'Bump version or release current version without changing package.json. Major for incompatible API changes, minor for adding backwards compatible features, patch for bugfixes.'
required: true
default: 'patch'
type: choice
options:
- current
- patch
- minor
- major
jobs:
updateVersionAndPublish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fregante/setup-git-user@v2
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Checkout latest main
run: |
git checkout main
git pull origin main
- name: Build types
run: |
yarn install
yarn build
- name: Update package version
env:
VERSION: ${{ inputs.version }}
run: |
yarn bump-version --v $VERSION
- name: Commit updated package.json
run: |
git add package.json
git commit -m "Update @seatsio/seatsio-types"
git push origin main
- name: Publish new version to NPM
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: './package.json'