-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fee90a8
commit 2472aa9
Showing
12 changed files
with
154 additions
and
91 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,81 @@ | ||
name: extra-package | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
set-release-version: | ||
description: 'Desired release version (x.y.z)' | ||
required: true | ||
type: string | ||
push-to-chocolatey: | ||
description: 'Push to chocolatey' | ||
type: boolean | ||
default: false | ||
push-to-winget: | ||
description: 'Push to winget' | ||
type: boolean | ||
default: false | ||
|
||
concurrency: extra-package | ||
|
||
jobs: | ||
check-release: | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
RELEASE_VERSION: ${{ github.event.inputs.set-release-version }} | ||
name: Check-release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
ref: ${{ github.event.inputs.set-release-version }} | ||
- name: Check if branch is a published release | ||
run: | | ||
if gh release list --exclude-drafts --exclude-pre-releases | grep -E "^${RELEASE_VERSION}" ; then | ||
echo "✅ Desired release ${RELEASE_VERSION} is a published release" | ||
else | ||
echo "❌ You have to run this workflow for a published release (excluding draft and pre-release), but the desired one [${RELEASE_VERSION}] is not." | ||
exit 1 | ||
fi | ||
push-to-chocolatey: | ||
if: github.event.inputs.push-to-chocolatey == 'true' | ||
needs: check-release | ||
env: | ||
RELEASE_VERSION: ${{ github.event.inputs.set-release-version }} | ||
CHOCOLATEY_TOKEN: ${{ secrets.LEPAPAREIL_CHOCOLATEY_TOKEN }} | ||
name: Push to chocolatey | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
ref: ${{ github.event.inputs.set-release-version }} | ||
- name: Push to chocolatey | ||
run: .\bin\release\push_package_to_chocolatey.ps1 $env:RELEASE_VERSION $env:CHOCOLATEY_TOKEN | ||
|
||
push-to-winget: | ||
if: github.event.inputs.push-to-winget == 'true' | ||
needs: check-release | ||
env: | ||
RELEASE_VERSION: ${{ github.event.inputs.set-release-version }} | ||
WINGET_TOKEN: ${{ secrets.LEPAPAREIL_WINGET_TOKEN }} | ||
name: Push to winget | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4.2.2 | ||
with: | ||
fetch-depth: 1 | ||
ref: ${{ github.event.inputs.set-release-version }} | ||
- name: Push to winget | ||
run: | | ||
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile .\wingetcreate.exe | ||
.\wingetcreate.exe version | ||
.\bin\release\push_package_to_winget.ps1 "$env:RELEASE_VERSION" "$env:LEPAPAREIL_WINGET_TOKEN" | ||
name: extra-package | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
set-release-version: | ||
description: 'Desired release version (x.y.z)' | ||
required: true | ||
type: string | ||
push-to-chocolatey: | ||
description: 'Push to chocolatey' | ||
type: boolean | ||
default: false | ||
push-to-winget: | ||
description: 'Push to winget' | ||
type: boolean | ||
default: false | ||
|
||
concurrency: extra-package | ||
|
||
jobs: | ||
check-release: | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
RELEASE_VERSION: ${{ github.event.inputs.set-release-version }} | ||
name: Check-release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4.2.2 | ||
with: | ||
persist-credentials: true | ||
fetch-depth: 1 | ||
ref: ${{ github.event.inputs.set-release-version }} | ||
- name: Check if branch is a published release | ||
run: | | ||
if gh release list --exclude-drafts --exclude-pre-releases | grep -E "^${RELEASE_VERSION}" ; then | ||
echo "✅ Desired release ${RELEASE_VERSION} is a published release" | ||
else | ||
echo "❌ You have to run this workflow for a published release (excluding draft and pre-release), but the desired one [${RELEASE_VERSION}] is not." | ||
exit 1 | ||
fi | ||
push-to-chocolatey: | ||
if: github.event.inputs.push-to-chocolatey == 'true' | ||
needs: check-release | ||
env: | ||
RELEASE_VERSION: ${{ github.event.inputs.set-release-version }} | ||
CHOCOLATEY_TOKEN: ${{ secrets.LEPAPAREIL_CHOCOLATEY_TOKEN }} | ||
name: Push to chocolatey | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4.2.2 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 1 | ||
ref: ${{ github.event.inputs.set-release-version }} | ||
- name: Push to chocolatey | ||
run: .\bin\release\push_package_to_chocolatey.ps1 $env:RELEASE_VERSION $env:CHOCOLATEY_TOKEN | ||
|
||
push-to-winget: | ||
if: github.event.inputs.push-to-winget == 'true' | ||
needs: check-release | ||
env: | ||
RELEASE_VERSION: ${{ github.event.inputs.set-release-version }} | ||
WINGET_TOKEN: ${{ secrets.LEPAPAREIL_WINGET_TOKEN }} | ||
name: Push to winget | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4.2.2 | ||
with: | ||
persist-credentials: true | ||
fetch-depth: 1 | ||
ref: ${{ github.event.inputs.set-release-version }} | ||
- name: Push to winget | ||
run: | | ||
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile .\wingetcreate.exe | ||
.\wingetcreate.exe version | ||
.\bin\release\push_package_to_winget.ps1 "$env:RELEASE_VERSION" "$env:LEPAPAREIL_WINGET_TOKEN" |
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
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
Oops, something went wrong.