-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (35 loc) · 1.18 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
name: Automatic release
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 */3 *'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with: # https://github.com/actions/checkout/issues/1471
fetch-depth: 0
fetch-tags: true
- name: Set git user
uses: fregante/setup-git-user@v2
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.x
- name: Update repository for release
id: update
run: echo "version=$(python update_for_release.py)" >> "$GITHUB_OUTPUT" # returns new version to output
- name: Commit changes & push
run: |
git add plugin.json
git commit -m "Update for release ${{ steps.update.outputs.version }}"
git tag "v${{ steps.update.outputs.version }}"
git push origin v${{ steps.update.outputs.version }}
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ steps.update.outputs.version }}
body: "Automatic release"
tag_name: v${{ steps.update.outputs.version }}