-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (64 loc) · 2.29 KB
/
continuous-delivery.yaml
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
60
61
62
63
64
65
66
name: Continuous Delivery
on:
push:
branches:
- master
jobs:
release:
if: contains(github.event.commits[0].message, 'chore(release)') == false
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Fetch all history.
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version-file: '.nvmrc'
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-progress --prefer-offline
- name: Build
run: npm run build
- env:
GITHUB_TOKEN: ${{ secrets.DOTTBOTT_TOKEN }}
id: release
name: Release
uses: ridedott/release-me-action@master
with:
commit-assets: |
./dist
node-module: true
release-rules: |
[
{ "release": "patch", "type": "build" },
{ "release": "patch", "type": "chore" },
{ "release": false, "type": "chore", "scope": "deps-dev" },
{ "release": "patch", "type": "chore", "scope": "deps-dev", "subject": "bump typescript from*" },
{ "release": "patch", "type": "chore", "scope": "deps-dev", "subject": "bump @vercel/ncc from*" },
{ "release": "patch", "type": "ci" },
{ "release": "patch", "type": "improvement" },
{ "release": "patch", "type": "refactor" },
{ "release": false, "subject": "*\\[skip release\\]*" }
]
- if: steps.release.outputs.released == 'true'
name: Authenticate
uses: actions/checkout@v4
with:
fetch-depth: 1
persist-credentials: true
token: ${{ secrets.DOTTBOTT_TOKEN }}
- if: steps.release.outputs.released == 'true'
name: Tag
run: |
git config --global user.name '{{ secrets.DOTTBOTT_USER_NAME }}'
git config --global user.email '{{ secrets.DOTTBOTT_USER_EMAIL }}'
git push origin :refs/tags/'v${{ steps.release.outputs.major }}'
git tag 'v${{ steps.release.outputs.major }}' --force
git push --tags
timeout-minutes: 10