-
-
Notifications
You must be signed in to change notification settings - Fork 52
40 lines (33 loc) · 1 KB
/
publish_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
name: Publish release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.vars.outputs.tag }}
steps:
- uses: actions/checkout@v4
- name: Get tag
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Set up Python 3.11
uses: actions/[email protected]
with:
python-version: "3.11"
- name: Get version
id: version
uses: home-assistant/actions/helpers/version@master
- name: Patch manifest and zip
run: |
sed -i 's/0.0.0/${{ steps.vars.outputs.tag }}/' custom_components/mass/manifest.json
cd custom_components/mass/
zip ../../mass.zip ./* translations/* -x '.*'
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./mass.zip
asset_name: mass.zip
tag: ${{ github.ref }}