-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (44 loc) · 1.53 KB
/
add-artifact.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
38
39
40
41
42
43
44
45
46
47
name: Create and publish Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
create_release_from_tag:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
This is an automated created release.
draft: false
prerelease: false
release_zip_file:
name: Prepare release asset
runs-on: ubuntu-latest
needs: [create_release_from_tag]
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: ZIP files
run: |
cd /home/runner/work/home-assistant-vacuum-viomise/home-assistant-vacuum-viomise/custom_components/viomise
zip viomi_se.zip -r ./
- name: Upload zip to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /home/runner/work/home-assistant-vacuum-viomise/home-assistant-vacuum-viomise/custom_components/viomise/viomi_se.zip
asset_name: viomi_se.zip
tag: ${{ github.ref }}
overwrite: true