v0.1.20 #22
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: Build and Release Addon | |
on: | |
workflow_dispatch: | |
pull_request: | |
release: | |
types: [published, created, edited, deleted, prereleased, released] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Create example.txt | |
run: echo "This is an example file..." > example.txt | |
- name: Zip example.txt | |
run: zip example.zip example.txt | |
# Upload the asset to the releases page, if the tag is a version tag; otherwise, upload it as an artifact. | |
- name: Upload Release Asset | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: example.zip | |
- name: Upload Artifact Asset | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: example.zip | |
if-no-files-found: error | |
retention-days: 1 | |
overwrite: true |