Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
NayamAmarshe authored Jan 15, 2024
1 parent e59bc08 commit 6f4297b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Deploy to GitHub Pages
on:
push:
branches: 'main'
workflow_dispatch:

jobs:
build_site:
Expand All @@ -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 .tag_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: ''
Expand Down

0 comments on commit 6f4297b

Please sign in to comment.