forked from tclh123/tunnelkit
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.24 KB
/
Copy pathrelease.yml
File metadata and controls
47 lines (44 loc) · 1.24 KB
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
name: Release
on:
milestone:
types: closed
jobs:
run_tests:
name: Run tests
runs-on: macos-12
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Run tests
run: |
swift test
publish_release:
name: Tag release
runs-on: ubuntu-latest
needs: run_tests
steps:
- uses: actions/checkout@v3
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
git_tag_gpgsign: true
git_push_gpgsign: false
- name: Tag release
env:
VERSION: ${{ github.event.milestone.title }}
run: |
DATE=`date "+%Y-%m-%d"`
COMMIT_MESSAGE="[ci skip] Set release date"
TAG_MESSAGE="Release"
sed -i'' -E "s/^## Unreleased.*$/## $VERSION ($DATE)/" CHANGELOG.md
git add CHANGELOG.md
git commit -m "$COMMIT_MESSAGE"
git tag "v$VERSION" -m "$TAG_MESSAGE"
git push && git push --tags