forked from smartHomeHub/SmartIR
-
Notifications
You must be signed in to change notification settings - Fork 39
37 lines (30 loc) · 870 Bytes
/
release.yaml
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
name: "Publish"
on:
release:
types: [published]
defaults:
run:
working-directory: custom_components/smartir
jobs:
publish:
name: "Publish"
runs-on: ubuntu-latest
steps:
- name: "Checkout the repository"
uses: actions/checkout@v3
- name: "Update version"
run: |
current="$(jq --raw-output .version manifest.json | sed 's/\./\\./g')"
sed -i s/$current/${{ github.event.release.tag_name }}/ manifest.json
- name: "Copy codes"
working-directory: ./
run: |
mv codes custom_components/smartir/codes
- name: "Zip component"
run: |
zip smartir.zip -r ./
- name: "Upload assets"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.event.release.tag_name }} smartir.zip