Updated 0publish dependency #13
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 | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Prepare | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
show-progress: false | |
- uses: gittools/actions/gitversion/setup@v0.10.2 | |
with: | |
versionSpec: '5.12.x' | |
- uses: gittools/actions/gitversion/execute@v0.10.2 | |
id: gitversion | |
# Build | |
- name: Inject version number | |
run: sed -i "s/^version = '.*'$/version = '${{steps.gitversion.outputs.legacySemVer}}'/" 0template.py | |
- name: 0template | |
run: ./0install.sh run https://apps.0install.net/0install/0template.xml 0template.xml.template version=${{steps.gitversion.outputs.legacySemVer}} | |
- name: 0test | |
run: ./0install.sh run https://apps.0install.net/0install/0test.xml 0template-${{steps.gitversion.outputs.legacySemVer}}.xml | |
# Release | |
- name: Create GitHub Release | |
if: github.ref_type == 'tag' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
0template-${{steps.gitversion.outputs.legacySemVer}}.xml | |
0template-${{steps.gitversion.outputs.legacySemVer}}.tar.bz2 | |
- name: Publish feed | |
if: github.ref_type == 'tag' | |
env: | |
GH_TOKEN: ${{secrets.PERSONAL_TOKEN}} | |
run: > | |
gh workflow run --repo=0install/apps Incoming | |
-f feed_url=https://github.com/${{github.repository}}/releases/download/${{github.ref_name}}/0template-${{steps.gitversion.outputs.legacySemVer}}.xml | |
-f archive_url=https://github.com/${{github.repository}}/releases/download/${{github.ref_name}}/0template-${{steps.gitversion.outputs.legacySemVer}}.tar.bz2 |