-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (95 loc) · 2.97 KB
/
propose_dated_release.yml
File metadata and controls
95 lines (95 loc) · 2.97 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
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
90
91
92
93
94
95
name: Propose Dated Stable Release
on:
workflow_call:
inputs:
runner:
type: string
default: "ubuntu-latest"
version_file:
type: string
default: "version.py"
setup_py:
type: string
default: "setup.py"
update_changelog:
type: boolean
default: false
changelog_file:
type: string
default: "CHANGELOG.md"
changelog_max_issues:
type: number
default: 50
branch:
type: string
default: "dev"
outputs:
version:
description: Updated version
value: ${{jobs.bump_version.outputs.version}}
changelog:
description: Changelog Contents
value: action/package/${{jobs.update_changelog.outputs.changelog}}
jobs:
bump_version:
runs-on: ${{inputs.runner}}
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{ inputs.branch }}
path: action/package/
- name: Checkout Scripts Repo
uses: actions/checkout@v2
with:
path: action/github/
repository: NeonGeckoCom/.github
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: "3.10"
- name: Increment Version
id: version
run: |
python action/github/scripts/dated_version_bump.py action/package/${{ inputs.version_file }} false
echo ::set-output name=version::$(python action/package/${{ inputs.setup_py }} --version)
- name: Push Version Change
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Increment Version to ${{ steps.version.outputs.version }}
repository: action/package/
update_changelog:
needs: bump_version
runs-on: ${{inputs.runner}}
if: ${{ inputs.update_changelog }}
outputs:
changelog: ${{ steps.changelog.outputs.changelog }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{ inputs.branch }}
path: action/package/
- name: Check Latest Release
id: latest_release
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ${{ github.repository }}
excludes: draft,prerelease
continue-on-error: true
- name: Generate Changelog
id: changelog
uses: heinrichreimer/github-changelog-generator-action@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
output: ${{ inputs.changelog_file }}
futureRelease: ${{needs.bump_version.outputs.version}}
maxIssues: ${{ inputs.changelog_max_issues }}
sinceTag: ${{ steps.latest_release.outputs.release }}
- name: Push Changelog
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update Changelog
repository: action/package/