Skip to content

Self update

Self update #85

Workflow file for this run

name: ci release
on: [pull_request, 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 }}