-
Notifications
You must be signed in to change notification settings - Fork 4
89 lines (72 loc) · 2.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Release
permissions:
contents: write
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * 1'
jobs:
test-lint-build:
timeout-minutes: 3
runs-on: ubuntu-latest
steps:
- name: Checkouting repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
persist-credentials: false
fetch-depth: 0
- name: Node setup
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version: 20
cache: yarn
- name: Install deps
run: yarn install && yarn nuxt prepare
- name: Run tests
run: yarn run test
- name: Run lint
run: yarn run lint --ignore-pattern ".github"
- name: Run Build
run: yarn run build
bump-package-version:
needs: test-lint-build
timeout-minutes: 4
runs-on: ubuntu-latest
steps:
- name: Checkouting repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
persist-credentials: false
fetch-depth: 0
- name: Node setup
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version: 18
cache: yarn
- name: Bump versions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git pull
npx --yes changelogen@latest --release
- name: Push changes
env:
PAT: ${{ secrets.ACTIONS_PAT }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin "https://[email protected]/logotip4ik/keycap"
git push origin ${{ github.ref_name }}
trigger-release:
needs: [test-lint-build, bump-package-version]
timeout-minutes: 1
runs-on: ubuntu-latest
steps:
- name: Trigger deployment
env:
AUTH: ${{ secrets.DEPLOYMENT_AUTH }}
TRIGGER_DEPLOYMENT: ${{ secrets.TRIGGER_DEPLOYMENT }}
shell: bash
run: curl -s -H "$AUTH" $TRIGGER_DEPLOYMENT > /dev/null