-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (33 loc) · 1014 Bytes
/
cd.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
name: Continuous Delivery
on:
push:
branches:
- master
workflow_dispatch:
jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.MERGEBOT_TOKEN }}
- name: Select Node.js version
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install dependencies
run: npm ci --no-audit --no-progress --prefer-offline
- name: Package action
run: npm run package
- name: Create tag
run: |
git config --global user.name '{{ secrets.MERGEBOT_USER_NAME }}'
git config --global user.email '{{ secrets.MERGEBOT_USER_EMAIL }}'
git add dist
git commit -m "Update action"
git push origin :refs/tags/'v${{ secrets.MERGEBOT_MAJOR }}'
git tag -a 'v${{ secrets.MERGEBOT_MAJOR }}' -m "Update action" --force
git push --tags