Skip to content

Automate release process #3

Automate release process

Automate release process #3

Workflow file for this run

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@v1.1.1
with:
versionSpec: '5.12.x'
- uses: gittools/actions/gitversion/execute@v1.1.1
id: gitversion
# Build
- name: Inject version number
run: sed -i "s/^version = '.*'$/version = '${{steps.gitversion.outputs.legacySemVer}}'/" 0bootstrap
- name: 0template
run: ./0install.sh run https://apps.0install.net/0install/0template.xml 0bootstrap.xml.template version=${{steps.gitversion.outputs.legacySemVer}}
#- name: 0test
# run: ./0install.sh run https://apps.0install.net/0install/0test.xml 0bootstrap-${{steps.gitversion.outputs.legacySemVer}}.xml
# Release
- name: Create GitHub Release
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v1
with:
files: |
0bootstrap-${{steps.gitversion.outputs.legacySemVer}}.xml
0bootstrap-${{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}}/0bootstrap-${{steps.gitversion.outputs.legacySemVer}}.xml
-f archive_url=https://github.com/${{github.repository}}/releases/download/${{github.ref_name}}/0bootstrap-${{steps.gitversion.outputs.legacySemVer}}.tar.bz2