-
Notifications
You must be signed in to change notification settings - Fork 32
45 lines (35 loc) · 1.19 KB
/
github-release.yml
File metadata and controls
45 lines (35 loc) · 1.19 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
name: Create a new GitHub Release
on:
workflow_dispatch:
jobs:
github-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install release requirements
run: pip install scriv bump-my-version
- name: Install pandoc for scriv
run: sudo apt install -y pandoc
- name: Configure Git user
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Read current version
id: version
run: |
echo "CURRENT_VERSION=$(bump-my-version show current_version)" >> $GITHUB_OUTPUT
- name: Create and push Git tag
env:
CURRENT_VERSION: ${{ steps.version.outputs.CURRENT_VERSION }}
run: |
git tag -a "v$CURRENT_VERSION" -m "Release v$CURRENT_VERSION"
git push origin "v$CURRENT_VERSION"
- name: Create GitHub release
run: scriv github-release --repo=openedx/openedx-events
env:
GITHUB_TOKEN: ${{ github.token }}