generated from ludeeus/integration_blueprint
-
-
Notifications
You must be signed in to change notification settings - Fork 5
37 lines (30 loc) · 1.05 KB
/
publish_archive.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
name: Publish archive
# yamllint disable-line rule:truthy
on:
release:
types: [published]
jobs:
build:
name: Publish archive
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Set package name"
working-directory: ./custom_components
run: echo "package=$(ls -F | grep \/$ | sed -n "s/\///g;1p")" >> $GITHUB_ENV
- name: "Set variables"
working-directory: ./custom_components
run: |
echo "archive=${{ env.package }}.zip" >> $GITHUB_ENV
echo "basedir=$(pwd)/${{ env.package }}" >> $GITHUB_ENV
- name: "Zip component dir"
working-directory: ./custom_components/${{ env.package }}
run: zip ${{ env.archive }} -r ./
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./custom_components/${{ env.package }}/${{ env.archive }}
asset_name: ${{ env.archive }}
tag: ${{ github.ref }}
overwrite: true