-
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (66 loc) · 2.08 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
name: Release
on:
schedule:
# At 10:00 on Monday (Berlin time is UTC+1 or UTC+2 depending on daylight saving time)
- cron: '00 08 * * 1'
workflow_dispatch:
inputs:
version:
description: 'The version to release'
type: string
concurrency:
group: release-${{ github.head_ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: read
statuses: write
packages: write
jobs:
release:
name: Release
runs-on: 'ubuntu-latest'
timeout-minutes: 15
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
fetch-depth: 0
- uses: jdx/mise-action@v2
with:
experimental: true
- name: Get Next Version
id: calculated_semvers
uses: ietf-tools/semver-action@v1
if: github.event.inputs.version == ''
with:
token: ${{ github.token }}
branch: main
- name: 'Set version'
run: echo '::set-output name=version::${{ steps.calculated_semvers.outputs.next }}${{ github.event.inputs.version }}'
id: semvers
- name: "Generate Changelog"
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
owner: "tuist"
repo: "Path"
configuration: ".github/changelog-configuration.json"
toTag: "main"
- name: Commit
id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_options: '--allow-empty'
skip_dirty_check: true
commit_message: "[Release] Path ${{ steps.semvers.outputs.version }}"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
draft: false
repository: tuist/Path
name: ${{ steps.semvers.outputs.version }}
tag_name: ${{ steps.semvers.outputs.version }}
body: ${{ steps.changelog.outputs.changelog }}
target_commitish: ${{ steps.auto-commit-action.outputs.commit_hash }}