0.4.0b7 #165
Workflow file for this run
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
name: Release | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
release_zip_file: | |
name: Prepare release asset | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v1 | |
- name: Get Version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: "Set version numbmer" | |
run: | | |
sed -i '/\bVERSION\b = /c\VERSION = "${{ steps.get_version.outputs.VERSION }}"' ${{ github.workspace }}/custom_components/mail_and_packages/const.py | |
sed -i '/version/c\ \"version\": \"${{ steps.get_version.outputs.VERSION }}\"' ${{ github.workspace }}/custom_components/mail_and_packages/manifest.json | |
# Pack the mail_and_packages dir as a zip and upload to the release | |
- name: ZIP MnP Dir | |
run: | | |
cd ${{ github.workspace }}/custom_components/mail_and_packages | |
zip mail_and_packages.zip -r ./ | |
- name: Upload zip to release | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ github.workspace }}/custom_components/mail_and_packages/mail_and_packages.zip | |
asset_name: mail_and_packages.zip | |
tag: ${{ github.ref }} | |
overwrite: true |