diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cf11df5..8ae40b0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,6 +3,7 @@ name: Deploy to GitHub Pages on: push: branches: 'main' + workflow_dispatch: jobs: build_site: @@ -26,6 +27,31 @@ jobs: - name: Install dependencies run: npm install + - name: Get latest release version + id: get-version + run: | + latest_version=$(curl -s https://api.github.com/repos/upscayl/upscayl/releases/latest | jq -r .name) + echo "Latest version is $latest_version" + echo "::set-output name=version::$latest_version" + + - name: Update version in file + run: echo "export const UPSCAYL_VERSION = '$(echo ${{ steps.get-version.outputs.version }})';" > src/lib/constants/upscayl-version.ts + + - name: Commit changes + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + git add src/lib/constants/upscayl-version.ts + git commit -m "Update Upscayl version to ${{ steps.get-version.outputs.version }}" + + - name: Push changes + uses: ad-m/github-push-action@v0.8.0 + with: + branch: ${{ github.ref }} + force: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: build env: BASE_PATH: '' diff --git a/src/lib/components/DownloadSection.svelte b/src/lib/components/DownloadSection.svelte index 3e03aa7..0a72bd0 100644 --- a/src/lib/components/DownloadSection.svelte +++ b/src/lib/components/DownloadSection.svelte @@ -158,6 +158,11 @@ target="_blank" rel="noreferrer noopener">EXE Installer + Portable ZIP diff --git a/src/lib/constants/upscayl-version.ts b/src/lib/constants/upscayl-version.ts index 0ea8705..221fb74 100644 --- a/src/lib/constants/upscayl-version.ts +++ b/src/lib/constants/upscayl-version.ts @@ -1 +1 @@ -export const UPSCAYL_VERSION = '2.9.5'; +export const UPSCAYL_VERSION = '2.9.8';