-
-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (48 loc) · 1.42 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
46
47
48
49
50
name: Release Version
on:
push:
branches: [main]
paths-ignore:
- ".github/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.6
with:
ref: main
- name: Set up Python 3
uses: actions/setup-python@v5.1.0
with:
python-version: |
3.11
check-latest: true
allow-prereleases: true
- name: Get Version
id: version
shell: bash
run: |
version="$(python3 ./.github/actions/get_version.py)"
echo "version=$version" >> $GITHUB_OUTPUT
- name: Is Tag exists
uses: mukunku/tag-exists-action@v1.6.0
id: checkTag
with:
tag: ${{ steps.version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: ZIP Component Dir
if: steps.checkTag.outputs.exists == 'false'
run: |
cd ${{ github.workspace }}/custom_components/ipv64
zip -r ipv64.zip ./
- name: Upload zip to release
if: steps.checkTag.outputs.exists == 'false'
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.workspace }}/custom_components/ipv64/ipv64.zip
asset_name: ipv64.zip
tag: ${{ steps.version.outputs.version }}
overwrite: true