-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from CM000n/enhancement/update_release_file
Update release workflow
- Loading branch information
Showing
2 changed files
with
34 additions
and
59 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,32 +2,46 @@ name: Release | |
|
||
on: | ||
release: | ||
types: [published] | ||
types: | ||
- published | ||
|
||
jobs: | ||
release_zip_file: | ||
name: Prepare release asset | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get version | ||
id: version | ||
uses: home-assistant/actions/helpers/version@master | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/[email protected] | ||
|
||
- name: Set version number | ||
- name: 🔢 Adjust version number | ||
shell: bash | ||
run: | | ||
python3 ${{ github.workspace }}/.github/scripts/update_manifest.py --version ${{ steps.version.outputs.version }} | ||
- name: Create zip | ||
version="${{ github.event.release.tag_name }}" | ||
version="${version,,}" | ||
version="${version#v}" | ||
yq e -P -o=json \ | ||
-i ".version = \"${version}\"" \ | ||
"${{ github.workspace }}/custom_components/qss/manifest.json" | ||
- name: 📦 Created zipped release package | ||
shell: bash | ||
run: | | ||
cd custom_components/qss | ||
cd "${{ github.workspace }}/custom_components/qss" | ||
zip qss.zip -r ./ | ||
- name: Upload zip to release | ||
uses: svenstaro/[email protected] | ||
- name: 🔏 Sign release package | ||
uses: sigstore/[email protected] | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ./custom_components/qss/qss.zip | ||
asset_name: qss.zip | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
inputs: ${{ github.workspace }}/custom_components/qss/qss.zip | ||
|
||
- name: ⬆️ Upload zip to release | ||
uses: softprops/[email protected] | ||
with: | ||
files: ${{ github.workspace }}/custom_components/qss/qss.zip | ||
|
||
# Upload this one in the future, currently problematic for HACS | ||
# https://github.com/frenck/spook/issues/286 | ||
# ${{ github.workspace }}/custom_components/spook/spook.zip.sigstore |