-
-
Notifications
You must be signed in to change notification settings - Fork 180
42 lines (36 loc) · 1.31 KB
/
generate_changelog.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
name: Generate Changelog
on:
workflow_dispatch:
inputs:
release_tag:
description: 'Release tag of latest release'
required: true
permissions:
contents: write
jobs:
process-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: false # disable default GITHUB_TOKEN
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Run Script
env:
RELEASE_TAG: ${{ inputs.release_tag }}
GITHUB_PAT: ${{ secrets.SAGE_ACCESS_TOKEN }}
run: python scripts/create_changelog.py "$RELEASE_TAG"
- name: Commit and Push Changes
env:
RELEASE_TAG: ${{ inputs.release_tag }}
GITHUB_PAT: ${{ secrets.SAGE_ACCESS_TOKEN }}
run: |
git remote set-url origin https://x-access-token:${GITHUB_PAT}@github.com/${{ github.repository }}.git
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add "src/changelogs/sage-${RELEASE_TAG}.txt"
git add conf/contributors.xml
git commit -m "Added changelog for release ${{ inputs.release_tag }}"
git push