Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -388,3 +388,12 @@ jobs:
releaseDraft: false
prerelease: false
args: ${{ matrix.args }}

publish-stable-downloads:
needs: publish-tauri
permissions:
contents: write
uses: ./.github/workflows/publish-stable-downloads.yml
with:
release-tag: ${{ github.event.release.tag_name || github.event.inputs.tag }}

48 changes: 48 additions & 0 deletions .github/workflows/publish-stable-downloads.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish Stable Installer Downloads

on:
workflow_call:
inputs:
release-tag:
required: true
type: string
workflow_dispatch:
inputs:
release-tag:
description: Release tag to add stable installer assets to
required: true
type: string

permissions:
contents: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Publish stable installer asset names
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ inputs.release-tag }}
run: |
VERSION="${RELEASE_TAG#v}"
MANIFEST_VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' frontend/src-tauri/Cargo.toml | head -n 1)"
if [ "$VERSION" != "$MANIFEST_VERSION" ]; then
echo "Error: release tag version $VERSION does not match manifest version $MANIFEST_VERSION"
exit 1
fi
mkdir stable-downloads
gh release download "$RELEASE_TAG" \
--repo "$GITHUB_REPOSITORY" \
--pattern "PictoPy_${VERSION}_x64-setup.exe" \
Comment thread
coderabbitai[bot] marked this conversation as resolved.
--pattern "PictoPy_${VERSION}_amd64.deb" \
--dir stable-downloads
cp "stable-downloads/PictoPy_${VERSION}_x64-setup.exe" PictoPy-Windows-Setup.exe
cp "stable-downloads/PictoPy_${VERSION}_amd64.deb" PictoPy-Debian-amd64.deb
gh release upload "$RELEASE_TAG" \
--repo "$GITHUB_REPOSITORY" \
PictoPy-Windows-Setup.exe \
PictoPy-Debian-amd64.deb \
--clobber
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@

<p align="center">
<strong>Download:</strong>&nbsp;&nbsp;&nbsp;
<a href="https://github.com/AOSSIE-Org/PictoPy/releases/latest/download/PictoPy_1.1.0_x64-setup.exe"><img src="docs/assets/readme-assets/btn-windows.svg" alt="Windows download button" height="34" align="absmiddle" /></a>
<a href="https://github.com/AOSSIE-Org/PictoPy/releases/latest/download/PictoPy_1.2.0_x64-setup.exe"><img src="docs/assets/readme-assets/btn-windows.svg" alt="Windows download button" height="34" align="absmiddle" /></a>
&nbsp;&nbsp;
<a href="https://github.com/AOSSIE-Org/PictoPy/releases/latest/download/PictoPy_aarch64.app.tar.gz"><img src="docs/assets/readme-assets/btn-macos.svg" alt="macOS download button" height="34" align="absmiddle" /></a>
&nbsp;&nbsp;
<a href="https://github.com/AOSSIE-Org/PictoPy/releases/latest/download/PictoPy_1.1.0_amd64.deb"><img src="docs/assets/readme-assets/btn-debian.svg" alt="Debian download button" height="34" align="absmiddle" /></a>
<a href="https://github.com/AOSSIE-Org/PictoPy/releases/latest/download/PictoPy_1.2.0_amd64.deb"><img src="docs/assets/readme-assets/btn-debian.svg" alt="Debian download button" height="34" align="absmiddle" /></a>
&nbsp;&nbsp;
<a href="https://github.com/AOSSIE-Org/PictoPy/releases/latest"><img src="docs/assets/readme-assets/btn-github.svg" alt="GitHub Releases button" height="34" align="absmiddle" /></a>
</p>
Expand Down
Loading