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

Update Upscayl Version #3

Update Upscayl Version

Update Upscayl Version #3

name: Update Upscayl Version
on: workflow_dispatch
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- 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 }}