Test artifact in linux action #13
Workflow file for this run
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: Create Release with Pre-Built Installers | ||
on: | ||
push: | ||
tags: | ||
- 'v*' # Trigger on tags that start with "v" (e.g., v1.0.0) | ||
workflow_dispatch: | ||
inputs: | ||
tag_name: | ||
description: 'Tag name for the release' | ||
required: true | ||
release_name: | ||
description: 'Release name' | ||
required: false | ||
release_body: | ||
description: 'Description of the release' | ||
required: false | ||
prerelease: | ||
description: 'Is this a prerelease?' | ||
required: false | ||
default: 'false' | ||
jobs: | ||
trigger-builds-and-wait: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Trigger Linux Build | ||
uses: benc-uk/workflow-dispatch@v1 | ||
with: | ||
workflow: build-on-change-linux-bare.yaml | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Wait for Linux Build to Complete | ||
id: wait-for-build | ||
run: | | ||
run_id=$(curl -s \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/actions/runs \ | ||
| jq -r ".workflow_runs[] | select(.name==\"Build framework on Linux Bare\") | .id" | head -n 1) | ||
while [[ "$(curl -s \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/actions/runs/$run_id \ | ||
| jq -r '.status')" != "completed" ]]; do | ||
echo "Waiting for the build to complete..." | ||
sleep 30 | ||
done | ||
conclusion=$(curl -s \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/actions/runs/$run_id \ | ||
| jq -r '.conclusion') | ||
if [[ "$conclusion" != "success" ]]; then | ||
echo "The build did not complete successfully" | ||
exit 1 | ||
else | ||
echo "The build completed successfully" | ||
fi | ||
download-artifacts: | ||
runs-on: ubuntu-latest | ||
needs: trigger-builds-and-wait | ||
steps: | ||
- name: Download Ubuntu 20.04 Artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: qc-framework-executables-ubuntu-20.04 | ||
- name: Download Ubuntu 22.04 Artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: qc-framework-executables-ubuntu-22.04 | ||
create-release: | ||
runs-on: ubuntu-latest | ||
needs: wait-for-builds | ||
Check failure on line 82 in .github/workflows/build-and-release.yaml GitHub Actions / Create Release with Pre-Built InstallersInvalid workflow file
|
||
steps: | ||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ github.ref_name }} # Use the tag name that triggered the workflow | ||
release_name: ${{ github.ref_name }} | ||
body: "Release for ${{ github.ref_name }}" | ||
prerelease: false | ||
files: | | ||
qc-framework-executables-ubuntu-20.04 | ||
qc-framework-executables-ubuntu-22.04 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |