-
Notifications
You must be signed in to change notification settings - Fork 28
51 lines (44 loc) · 1.51 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
name: Tag and release
on:
workflow_dispatch:
inputs:
version:
description: Version (must have matching CHANGES.rst entry)
required: true
description:
description: Release description (used as tag message and GitHub release body)
required: true
jobs:
release:
name: Tag and release
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: master
fetch-depth: 0
- name: Configure git
run: |
git config user.name "GitHub Actions"
git config user.email "<>"
- name: Set changelog release date
run: |
release_scripts/set_release_date ${{ github.event.inputs.version }}
- name: Commit changelog and tag release
run: |
git add CHANGES.rst
git commit -m "Set ${{ github.event.inputs.version }} release date"
git push origin HEAD
git tag -a ${{ github.event.inputs.version }} -m "${{ github.event.inputs.description }}"
git push origin ${{ github.event.inputs.version }}
- name: Create GitHub release (triggers publish-to-pypi workflow)
uses: zendesk/action-create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: ${{ github.event.inputs.description }}
draft: false
prerelease: false