-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 2.03 KB
/
ci-release.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: ci release
on:
push:
branches:
- master
workflow_dispatch:
jobs:
self-release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact: 'ubuntu'
command: './_AutoinstallCreator/release.sh'
- os: windows-latest
artifact: 'windows'
command: './.tools/busybox.exe sh ./_AutoinstallCreator/release.sh'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # need for self_count
- run: ${{ matrix.command }}
id: create_artifact
- uses: actions/upload-artifact@v3
with:
name: AutoinstallCreator-${{ matrix.artifact }}
path: ${{ steps.create_artifact.outputs.artifact_path }}
- uses: actions/upload-artifact@v3
with:
name: body
path: ./body.md
upload_release:
needs: self-release
runs-on: ubuntu-latest
steps:
- name: Wait for build to succeed
id: wait-for-build
uses: fountainhead/[email protected]
with:
checkName: 'Run test-create (windows-latest, windows)'
ref: ${{ github.event.pull_request.head.sha || github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
timeoutSeconds: 1800
- name: setFailed when not wait-for-build
uses: actions/github-script@v6
if: steps.wait-for-build.outputs.conclusion != 'success'
with:
script: |
core.setFailed('error: conclusion is ${{ steps.wait-for-build.outputs.conclusion }}')
- uses: actions/checkout@v3
- run: git push origin :refs/tags/latest-${{ github.base_ref || github.ref_name }}
- uses: actions/download-artifact@v3
- uses: ncipollo/release-action@v1
with:
tag: latest-${{ github.base_ref || github.ref_name }}
artifacts: ./AutoinstallCreator-*/*
bodyFile: ./body/body.md
allowUpdates: true
removeArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}