-
Notifications
You must be signed in to change notification settings - Fork 6
37 lines (31 loc) · 1012 Bytes
/
release.yaml
File metadata and controls
37 lines (31 loc) · 1012 Bytes
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: Release
on:
release:
types: [published]
env:
COMPONENT_NAME: roborock_custom_map
jobs:
release:
name: Prepare release
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Download repo
uses: actions/checkout@v4
- name: Adjust version number
shell: bash
run: |
version="${{ github.event.release.tag_name }}"
yq e -P -o=json \
-i ".version = \"${version}\"" \
"${{ github.workspace }}/custom_components/${{ env.COMPONENT_NAME }}/manifest.json"
- name: Zip ${{ env.COMPONENT_NAME }} dir
run: |
cd "${{ github.workspace }}/custom_components/${{ env.COMPONENT_NAME }}"
zip ${{ env.COMPONENT_NAME }}.zip -r ./
- name: Upload zip to release
uses: softprops/action-gh-release@v2.1.0
with:
files: ${{ github.workspace }}/custom_components/${{ env.COMPONENT_NAME }}/${{ env.COMPONENT_NAME }}.zip