Skip to content

Upload Release Asset #68

Upload Release Asset

Upload Release Asset #68

on:
workflow_dispatch:
#push:
# Sequence of patterns matched against refs/tags
#tags:
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Upload Release Asset
jobs:
build:
# Reuse the build workflow (producing artifacts)
uses: ./.github/workflows/02-build-installer.yml
release:
# Publish
name: Upload Release Asset for ${{ matrix.os }}
runs-on: ubuntu-latest
needs: build
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
os: [windows-2022]
build_type: [Release]
steps:
- name: Checkout self
uses: actions/checkout@v4
- name: Download pre-packed asset
uses: actions/download-artifact@v4
with:
# name: ProMesh4-Installer-${{matrix.os}}
name: ProMesh4-Installer-windows-2022-${{github.sha}}
github-token: ${{ github.token }}
repository: ${{ github.repository }}
- name: Download pre-packed artifact
run: ls .
# Fetch the latest release from GitHub API
- name: Get latest release
id: get_release
run: |
latest_release=$(curl -s \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/releases/latest)
echo "::set-output name=upload_url::$(echo $latest_release | jq -r .upload_url | sed -e "s/{?name,label}//")"
- name: Test
run: echo "URL=${{ steps.get_release.outputs.upload_url }}"
- name: Upload Release Binary
uses: AButler/[email protected]
with:
files: "./ProMesh4-Installer.exe"
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: v4.9.0