|
@@ -83,7 +83,7 @@ jobs:
|
|
|
|
|
|
- name: Add msbuild to PATH
|
|
- name: Add msbuild to PATH
|
|
if: matrix.build_system == 'vs2019'
|
|
if: matrix.build_system == 'vs2019'
|
|
- uses: microsoft/setup-msbuild@v1
|
|
|
|
|
|
+ uses: microsoft/setup-msbuild@v2
|
|
with:
|
|
with:
|
|
vs-version: '[16.0,17.0)'
|
|
vs-version: '[16.0,17.0)'
|
|
|
|
|
|
@@ -287,8 +287,9 @@ jobs:
|
|
|
|
|
|
|
|
|
|
- name: "Share: build artifact"
|
|
- name: "Share: build artifact"
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
|
|
+ uses: actions/upload-artifact@v4
|
|
with:
|
|
with:
|
|
|
|
+ name: ${{ matrix.target }}-${{ matrix.build_system }}-${{ matrix.architecture }}
|
|
path: ${{ env.HASHLINK_DISTRIBUTION }}
|
|
path: ${{ env.HASHLINK_DISTRIBUTION }}
|
|
|
|
|
|
|
|
|
|
@@ -307,27 +308,14 @@ jobs:
|
|
uses: actions/checkout@v4
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
- name: "Get: all build artifacts"
|
|
- name: "Get: all build artifacts"
|
|
- uses: actions/download-artifact@v3
|
|
|
|
|
|
+ uses: actions/download-artifact@v4
|
|
|
|
|
|
- name: "Delete previous 'latest' release"
|
|
- name: "Delete previous 'latest' release"
|
|
|
|
+ env:
|
|
|
|
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
run: |
|
|
set -eu
|
|
set -eu
|
|
-
|
|
|
|
- api_base_url="$GITHUB_API_URL/repos/$GITHUB_REPOSITORY"
|
|
|
|
-
|
|
|
|
- # delete 'latest' github release
|
|
|
|
- release_id=$(curl -fsL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/$GITHUB_REPOSITORY/releases | jq -r '.[] | select(.tag_name == "latest") | .id')
|
|
|
|
- if [[ -n $release_id ]]; then
|
|
|
|
- echo "Deleting release [$api_base_url/releases/$release_id]..."
|
|
|
|
- curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -fsSL -X DELETE "$api_base_url/releases/$release_id"
|
|
|
|
- fi
|
|
|
|
-
|
|
|
|
- # delete 'latest' git tag
|
|
|
|
- tag_url="$api_base_url/git/refs/tags/latest"
|
|
|
|
- if curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -fsLo /dev/null --head "$tag_url"; then
|
|
|
|
- echo "Deleting tag [$tag_url]..."
|
|
|
|
- curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -fsSL -X DELETE "$tag_url"
|
|
|
|
- fi
|
|
|
|
|
|
+ gh release delete latest --cleanup-tag --yes || true
|
|
|
|
|
|
- name: "Create 'latest' Release"
|
|
- name: "Create 'latest' Release"
|
|
env:
|
|
env:
|
|
@@ -342,7 +330,7 @@ jobs:
|
|
gh release create latest \
|
|
gh release create latest \
|
|
--prerelease \
|
|
--prerelease \
|
|
--title "HashLink Nightly Build" \
|
|
--title "HashLink Nightly Build" \
|
|
- "artifact/hashlink-${short_commit}-darwin.tar.gz#hashlink-latest-darwin.tar.gz" \
|
|
|
|
- "artifact/hashlink-${short_commit}-linux-amd64.tar.gz#hashlink-latest-linux-amd64.tar.gz" \
|
|
|
|
- "artifact/hashlink-${short_commit}-win32.zip#hashlink-latest-win32.zip" \
|
|
|
|
- "artifact/hashlink-${short_commit}-win64.zip#hashlink-latest-win64.zip"
|
|
|
|
|
|
+ "darwin-make-64/hashlink-${short_commit}-darwin.tar.gz#hashlink-latest-darwin.tar.gz" \
|
|
|
|
+ "linux-make-64/hashlink-${short_commit}-linux-amd64.tar.gz#hashlink-latest-linux-amd64.tar.gz" \
|
|
|
|
+ "windows-vs2019-32/hashlink-${short_commit}-win32.zip#hashlink-latest-win32.zip" \
|
|
|
|
+ "windows-vs2019-64/hashlink-${short_commit}-win64.zip#hashlink-latest-win64.zip"
|