-
-
Notifications
You must be signed in to change notification settings - Fork 93
30 lines (28 loc) · 1.14 KB
/
main.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
name: Release
on:
release:
types: [published]
jobs:
release:
name: Prepare release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: "Set version number"
run: |
sed -i '/ "version": /c\ "version": "${{ github.ref }}",' custom_components/garbage_collection/manifest.json
sed -i 's|heads/tags/||' custom_components/garbage_collection/manifest.json
sed -i 's|refs/tags/||' custom_components/garbage_collection/manifest.json
# Pack the HACS dir as a zip and upload to the release
- name: ZIP garbage_collection Dir
run: |
cd /home/runner/work/Garbage-Collection/Garbage-Collection/custom_components/garbage_collection
zip garbage_collection.zip -r ./
- name: Upload zip to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /home/runner/work/Garbage-Collection/Garbage-Collection/custom_components/garbage_collection/garbage_collection.zip
asset_name: garbage_collection.zip
tag: ${{ github.ref }}
overwrite: true