1
0
Fork 0
mirror of synced 2024-06-17 01:54:46 +12:00

Merge pull request #355 from loathingKernel/next

Update the workflows to include the ability to create pre-releases from the snapshot workflow
This commit is contained in:
Stelios Tsampas 2023-12-26 19:59:33 +02:00 committed by GitHub
commit 6219084628
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 146 additions and 41 deletions

View file

@ -42,6 +42,9 @@ Add any other context about the problem here.
**Error message** **Error message**
You can find logs in these locations You can find logs in these locations
- Windows: `C:\Users\<username>\AppData\Local\Rare\Rare\cache\logs`
- Linux: `~/.cache/Rare/Rare/logs` | OS | Path |
- masOS: `/Users/<username>/Library/Caches/Rare/Rare/logs` |---------|----------------------------------------------------------|
| Windows | `C:\Users\<username>\AppData\Local\Rare\Rare\cache\logs` |
| Linux | `/home/<username>/.cache/Rare/Rare/logs` |
| masOS | `/Users/<username>/Library/Caches/Rare/Rare/logs` |

View file

@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
cache: pip cache: pip
python-version: '3.11' python-version: '3.12'
check-latest: true check-latest: true
architecture: x64 architecture: x64
- name: Install Build Dependencies - name: Install Build Dependencies

View file

@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
cache: pip cache: pip
python-version: '3.11' python-version: '3.12'
check-latest: true check-latest: true
architecture: x64 architecture: x64
- name: Install build dependencies - name: Install build dependencies

View file

@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
cache: pip cache: pip
python-version: '3.11' python-version: '3.12'
check-latest: true check-latest: true
- name: Install Build Dependencies - name: Install Build Dependencies
run: pip install pyinstaller run: pip install pyinstaller

View file

@ -3,6 +3,9 @@ name: job_release
on: on:
workflow_call: workflow_call:
inputs: inputs:
version:
required: true
type: string
file1: file1:
required: true required: true
type: string type: string
@ -30,7 +33,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ inputs.file1 }} file: ${{ inputs.file1 }}
asset_name: ${{ inputs.name1 }} asset_name: ${{ inputs.name1 }}
tag: ${{ github.ref }} tag: ${{ inputs.version }}
overwrite: true overwrite: true
- name: Download ${{ inputs.name2 }} artifact - name: Download ${{ inputs.name2 }} artifact
@ -45,5 +48,5 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ inputs.file2 }} file: ${{ inputs.file2 }}
asset_name: ${{ inputs.name2 }} asset_name: ${{ inputs.name2 }}
tag: ${{ github.ref }} tag: ${{ inputs.version }}
overwrite: true overwrite: true

35
.github/workflows/job_version.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: job_version
on:
workflow_call:
outputs:
version:
value: ${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }}
branch:
value: ${{ jobs.version.outputs.branch }}
jobs:
version:
name: Version
runs-on: ubuntu-latest
outputs:
tag_abbrev: ${{ steps.describe.outputs.tag_abbrev }}
tag_offset: ${{ steps.describe.outputs.tag_offset }}
sha_short: ${{ steps.describe.outputs.sha_short }}
full_desc: ${{ steps.describe.outputs.full_desc }}
branch: ${{ steps.describe.outputs.branch }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Describe
id: describe
shell: bash
run: |
tag_abbrev=$(git tag --sort=v:refname | grep -oE "(^[0-9]+\.[0-9]+(.[0-9]+)?)$" | tail -1)
echo "tag_abbrev=$tag_abbrev" >> $GITHUB_OUTPUT
echo "tag_offset=$(git rev-list $tag_abbrev..HEAD --count)" >> $GITHUB_OUTPUT
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "full_desc=$(git describe --long --tags)" >> $GITHUB_OUTPUT
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT

View file

@ -13,7 +13,7 @@ permissions:
jobs: jobs:
describe: title:
name: Version ${{ github.ref_name }} name: Version ${{ github.ref_name }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -37,6 +37,7 @@ jobs:
name: Ubuntu name: Ubuntu
uses: ./.github/workflows/job_release.yml uses: ./.github/workflows/job_release.yml
with: with:
version: ${{ github.ref_name }}
file1: Rare.deb file1: Rare.deb
name1: Rare-${{ github.ref_name }}.deb name1: Rare-${{ github.ref_name }}.deb
@ -50,6 +51,7 @@ jobs:
name: AppImage name: AppImage
uses: ./.github/workflows/job_release.yml uses: ./.github/workflows/job_release.yml
with: with:
version: ${{ github.ref_name }}
file1: Rare.AppImage file1: Rare.AppImage
name1: Rare-${{ github.ref_name }}.AppImage name1: Rare-${{ github.ref_name }}.AppImage
file2: Rare.AppImage.zsync file2: Rare.AppImage.zsync
@ -66,6 +68,7 @@ jobs:
name: Nuitka Windows name: Nuitka Windows
uses: ./.github/workflows/job_release.yml uses: ./.github/workflows/job_release.yml
with: with:
version: ${{ github.ref_name }}
file1: Rare-Windows.zip file1: Rare-Windows.zip
name1: Rare-Windows-${{ github.ref_name }}.zip name1: Rare-Windows-${{ github.ref_name }}.zip
@ -79,6 +82,7 @@ jobs:
name: cx-Freeze msi name: cx-Freeze msi
uses: ./.github/workflows/job_release.yml uses: ./.github/workflows/job_release.yml
with: with:
version: ${{ github.ref_name }}
file1: Rare.msi file1: Rare.msi
name1: Rare-${{ github.ref_name }}.msi name1: Rare-${{ github.ref_name }}.msi
@ -92,19 +96,21 @@ jobs:
name: cx-Freeze zip name: cx-Freeze zip
uses: ./.github/workflows/job_release.yml uses: ./.github/workflows/job_release.yml
with: with:
version: ${{ github.ref_name }}
file1: Rare-Windows.zip file1: Rare-Windows.zip
name1: Rare-Windows-${{ github.ref_name }}.zip name1: Rare-Windows-${{ github.ref_name }}.zip
macos: macos:
name: MacOS name: macOS
uses: ./.github/workflows/job_macos.yml uses: ./.github/workflows/job_macos.yml
with: with:
version: ${{ github.ref_name }} version: ${{ github.ref_name }}
macos-release: macos-release:
needs: macos needs: macos
name: MacOS name: macOS
uses: ./.github/workflows/job_release.yml uses: ./.github/workflows/job_release.yml
with: with:
version: ${{ github.ref_name }}
file1: Rare.dmg file1: Rare.dmg
name1: Rare-${{ github.ref_name }}.dmg name1: Rare-${{ github.ref_name }}.dmg

View file

@ -4,41 +4,39 @@ name: "Snapshot"
on: on:
workflow_dispatch: workflow_dispatch:
inputs:
prerelease:
description: "Create a pre-release"
default: false
required: true
type: boolean
pull_request: pull_request:
branches: branches:
- main - main
types: [closed] types: [closed]
permissions:
contents: write
jobs: jobs:
version: version:
name: Describe name: Describe
runs-on: ubuntu-latest uses: ./.github/workflows/job_version.yml
outputs:
tag_abbrev: ${{ steps.describe.outputs.tag_abbrev }}
tag_offset: ${{ steps.describe.outputs.tag_offset }}
sha_short: ${{ steps.describe.outputs.sha_short }}
full_desc: ${{ steps.describe.outputs.full_desc }}
branch: ${{ steps.describe.outputs.branch }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Describe version
id: describe
shell: bash
run: |
tag_abbrev=$(git tag --sort=v:refname | grep -oE "(^[0-9]+\.[0-9]+(.[0-9]+)?)$" | tail -1)
echo "tag_abbrev=$tag_abbrev" >> $GITHUB_OUTPUT
echo "tag_offset=$(git rev-list $tag_abbrev..HEAD --count)" >> $GITHUB_OUTPUT
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "full_desc=$(git describe --long --tags)" >> $GITHUB_OUTPUT
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
describe: title:
needs: version needs: version
name: Version ${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }} name: Version ${{ needs.version.outputs.version }}
runs-on: ubuntu-latest
steps:
- run: "true"
prerelease:
if: ${{ inputs.prerelease }}
needs: version
name: Create pre-release
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: "true" - run: "true"
@ -48,14 +46,34 @@ jobs:
name: Ubuntu name: Ubuntu
uses: ./.github/workflows/job_ubuntu.yml uses: ./.github/workflows/job_ubuntu.yml
with: with:
version: ${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }} version: ${{ needs.version.outputs.version }}
ubuntu-release:
if: ${{ inputs.prerelease }}
needs: [ubuntu, prerelease]
name: Ubuntu
uses: ./.github/workflows/job_release.yml
with:
version: ${{ needs.version.outputs.version }}
file1: Rare.deb
name1: Rare-${{ needs.version.outputs.version }}.deb
appimage: appimage:
needs: version needs: version
name: AppImage name: AppImage
uses: ./.github/workflows/job_appimage.yml uses: ./.github/workflows/job_appimage.yml
with: with:
version: ${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }} version: ${{ needs.version.outputs.version }}
appimage-release:
if: ${{ inputs.prerelease }}
needs: [appimage, prerelease]
name: AppImage
uses: ./.github/workflows/job_release.yml
with:
version: ${{ needs.version.outputs.version }}
file1: Rare.AppImage
name1: Rare-${{ needs.version.outputs.version }}.AppImage
file2: Rare.AppImage.zsync
name2: Rare-${{ needs.version.outputs.version }}.AppImage.zsync
nuitka-win: nuitka-win:
if: ${{ false }} if: ${{ false }}
@ -63,26 +81,62 @@ jobs:
name: Nuitka Windows name: Nuitka Windows
uses: ./.github/workflows/job_nuitka-win.yml uses: ./.github/workflows/job_nuitka-win.yml
with: with:
version: ${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }} version: ${{ needs.version.outputs.version }}
nuitka-win-release:
if: ${{ inputs.prerelease }}
needs: [nuitka-win, prerelease]
name: Nuitka Windows
uses: ./.github/workflows/job_release.yml
with:
version: ${{ needs.version.outputs.version }}
file1: Rare-Windows.zip
name1: Rare-Windows-${{ needs.version.outputs.version }}.zip
cx-freeze-msi: cx-freeze-msi:
needs: version needs: version
name: cx-Freeze msi name: cx-Freeze msi
uses: ./.github/workflows/job_cx-freeze-msi.yml uses: ./.github/workflows/job_cx-freeze-msi.yml
with: with:
version: ${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }} version: ${{ needs.version.outputs.version }}
cx-freeze-msi-release:
if: ${{ inputs.prerelease }}
needs: [cx-freeze-msi, prerelease]
name: cx-Freeze msi
uses: ./.github/workflows/job_release.yml
with:
version: ${{ needs.version.outputs.version }}
file1: Rare.msi
name1: Rare-${{ needs.version.outputs.version }}.msi
cx-freeze-zip: cx-freeze-zip:
needs: version needs: version
name: cx-Freeze zip name: cx-Freeze zip
uses: ./.github/workflows/job_cx-freeze-zip.yml uses: ./.github/workflows/job_cx-freeze-zip.yml
with: with:
version: ${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }} version: ${{ needs.version.outputs.version }}
cx-freeze-zip-release:
if: ${{ inputs.prerelease }}
needs: [cx-freeze-zip, prerelease]
name: cx-Freeze zip
uses: ./.github/workflows/job_release.yml
with:
version: ${{ needs.version.outputs.version }}
file1: Rare-Windows.zip
name1: Rare-Windows-${{ needs.version.outputs.version }}.zip
macos: macos:
needs: version needs: version
name: MacOS name: macOS
uses: ./.github/workflows/job_macos.yml uses: ./.github/workflows/job_macos.yml
with: with:
version: ${{ needs.version.outputs.tag_abbrev }}.${{ needs.version.outputs.tag_offset }} version: ${{ needs.version.outputs.version }}
macos-release:
if: ${{ inputs.prerelease }}
needs: [macos, prerelease]
name: macOS
uses: ./.github/workflows/job_release.yml
with:
version: ${{ needs.version.outputs.version }}
file1: Rare.dmg
name1: Rare-${{ needs.version.outputs.version }}.dmg

View file

@ -745,3 +745,7 @@ QLabel#WrapperSettingsLabel {
border-color: rgb( 47, 79, 79); border-color: rgb( 47, 79, 79);
background-color: rgb( 40, 42, 46); background-color: rgb( 40, 42, 46);
} }
QLabel#WrapperSettingsLabel:disabled {
border-color: rgb( 67, 71, 77);
background-color: rgb( 32, 34, 37);
}