Add ludeeus/action-require-labels (#27) #8
This file contains hidden or 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: Publish | |
on: | |
release: | |
types: | |
- published | |
push: | |
branches: | |
- main | |
concurrency: | |
group: publish-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: {} | |
jobs: | |
release_zip_file: | |
name: Publish readme zip file asset | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: 📥 Checkout the repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: 🛠️ Set up Python | |
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
with: | |
python-version: "3.13" | |
- name: 🔢 Get version | |
if: ${{ github.event_name == 'release' }} | |
id: version | |
uses: home-assistant/actions/helpers/version@a19f5f4e08ef2786e4604a948f62addd937a6bc9 # master | |
# Pack the readme dir as a zip and upload to the release | |
- name: 📦 ZIP readme dir | |
run: | | |
cd ${{ github.workspace }}/custom_components/readme | |
zip readme.zip -r ./ | |
- name: 📤 Upload zip to action | |
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
name: readme.zip | |
path: ${{ github.workspace }}/custom_components/readme/readme.zip | |
retention-days: 7 | |
- name: 📤 Upload zip to release | |
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2 | |
if: ${{ github.event_name == 'release' }} | |
with: | |
files: ${{ github.workspace }}/custom_components/readme/readme.zip |