Skip to content

Commit

Permalink
ci: switch from deprecated artifact release action, try keeping 'late…
Browse files Browse the repository at this point in the history
…st' pre-release in sync with master branch
  • Loading branch information
Neverous committed Apr 18, 2023
1 parent 5e4db5c commit e673078
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/asset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
required: true
type: string

concurrency:
group: ${{ github.ref }}
cancel-in-progress: false

jobs:
upload-asset:
name: Upload release asset ${{ inputs.os }} Qt ${{ matrix.qt-version }} with ${{ inputs.compiler }} ${{ inputs.extension }}
Expand All @@ -35,12 +39,15 @@ jobs:
name: EFIBootEditor-${{ github.sha }}-${{ inputs.os }}-qt-${{ matrix.qt-version }}-${{ inputs.compiler }}
path: .

- name: Rename artifact for release upload
run: mv EFIBootEditor-*-${{ inputs.os }}-qt-${{ matrix.qt-version }}${{ inputs.extension }} EFIBootEditor-${{ inputs.version }}-${{ inputs.os }}-qt-${{ matrix.qt-version }}-${{ inputs.compiler }}${{ inputs.extension }}
shell: bash

- name: Upload ${{ inputs.extension }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: EFIBootEditor-${{ inputs.version }}-${{ inputs.os }}-qt-${{ matrix.qt-version }}${{ inputs.extension }}
asset_name: EFIBootEditor-${{ inputs.version }}-${{ inputs.os }}-qt-${{ matrix.qt-version }}-${{ inputs.compiler }}${{ inputs.extension }}
asset_content_type: application/octet-stream
prerelease: ${{ github.ref_type != 'tag' }}
files: |
EFIBootEditor-${{ inputs.version }}-${{ inputs.os }}-qt-${{ matrix.qt-version }}-${{ inputs.compiler }}${{ inputs.extension }}
name: ${{ github.ref_type == 'tag' && github.ref || 'latest' }}
tag_name: ${{ github.ref_type == 'tag' && github.ref || 'latest' }}
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ jobs:

upload-linux-asset:
name: Upload Linux release asset ${{ matrix.os }} with ${{ matrix.compiler }} ${{ matrix.extension }}
if: github.ref_type == 'tag'
needs: build-linux
strategy:
fail-fast: false
Expand All @@ -88,6 +87,9 @@ jobs:
- .deb
- -dbgsym.ddeb

permissions:
contents: write

uses: ./.github/workflows/asset.yml
with:
os: ${{ matrix.os }}
Expand All @@ -97,7 +99,6 @@ jobs:

upload-windows-asset:
name: Upload Windows release asset ${{ matrix.os }} with ${{ matrix.compiler }} ${{ matrix.extension }}
if: github.ref_type == 'tag'
needs: build-windows
strategy:
fail-fast: false
Expand All @@ -110,6 +111,9 @@ jobs:
- .zip
- .msi

permissions:
contents: write

uses: ./.github/workflows/asset.yml
with:
os: ${{ matrix.os }}
Expand All @@ -119,7 +123,6 @@ jobs:

upload-macos-asset:
name: Upload MacOS release asset ${{ matrix.os }} with ${{ matrix.compiler }} ${{ matrix.extension }}
if: github.ref_type == 'tag'
needs: build-macos
strategy:
fail-fast: false
Expand All @@ -131,6 +134,9 @@ jobs:
- .tar.zst
- .dmg

permissions:
contents: write

uses: ./.github/workflows/asset.yml
with:
os: ${{ matrix.os }}
Expand Down

0 comments on commit e673078

Please sign in to comment.