-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (44 loc) · 1.17 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
name: "Release-Builder"
on:
workflow_dispatch:
push:
tags:
- 'v*'
env:
PYTHON_VER: 3.11
jobs:
test:
uses: ./.github/workflows/test-plugin.yml
deps:
name: "Build"
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON_VER }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VER }}
- name: Bump manifest version from tag
run: |
tag = $GITHUB_REF
content=$(jq --arg tag $tag '.Version = $tag' ./src/plugin.json)
echo $content > ./src/plugin.json
- name: Build
run: make build
- name: Dist
run: make dist
- name: Package
run: make package
- name: Get zip name
id: zipname
run: echo ::set-output name=zipname::$(make zipname)
- name: Publish
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: ${{ contains(github.ref, '-')}}
files: "./${{steps.zipname.outputs.zipname}}"
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}