forked from sreiter/ProMesh
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 2.03 KB
/
03-update-assets.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
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:
name: Upload Release Asset for ${{ matrix.os }}
runs-on: ubuntu-latest
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-latest]
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-latest
# path: $GITHUB_WORKSPACE
github-token: ${{ github.token }}
repository: ${{ github.repository }}
run-id: 11026224064
- name: Download pre-packed artifact
run: ls .
#- name: Download pre-packed artifact
# run: ls ./assets
# 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
id: upload-release-asset
uses: actions/upload-release-asset@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ProMesh4-Installer.exe
asset_name: ProMesh4-Installer-win64.exe
asset_content_type: application/octet-stream