-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (39 loc) · 1.68 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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/[email protected]
with:
versionSpec: '5.12.x'
- uses: gittools/actions/gitversion/[email protected]
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