generated from mistricky/nvim-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 19
61 lines (51 loc) · 1.45 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
name: Release
on:
workflow_run:
workflows: [build]
types:
- completed
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Read version from project config
id: read_toml
uses: SebRollen/[email protected]
with:
file: project.toml
field: project.version
- name: Replace template
run: python3 scripts/replace-template.py
- name: Commit changes
uses: EndBug/add-and-commit@v7
with:
message: '[Release] ${{ steps.read_toml.outputs.value }}'
pull_strategy: 'NO-PULL'
push: false
- name: Push changes
run: |
git pull --rebase
git push
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.read_toml.outputs.value }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
generateReleaseNotes: true