mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
ci: switch to gh pat
This commit is contained in:
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
@@ -135,35 +135,29 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Update VERSION
|
||||
env:
|
||||
GH_PAT: ${{ secrets.GH_PAT }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config user.name "dms-ci"
|
||||
git config user.email "dms-ci@users.noreply.github.com"
|
||||
|
||||
version="${GITHUB_REF#refs/tags/}"
|
||||
version_no_v="${version#v}"
|
||||
echo "Updating to version: $version"
|
||||
|
||||
# Update VERSION file in quickshell/
|
||||
echo "${version}" > quickshell/VERSION
|
||||
|
||||
git add quickshell/VERSION
|
||||
|
||||
if ! git diff --cached --quiet; then
|
||||
git commit -m "chore: bump version to $version"
|
||||
git push origin HEAD:master || git push origin HEAD:main
|
||||
echo "Pushed version updates to master"
|
||||
else
|
||||
echo "No version changes needed"
|
||||
git push https://x-access-token:${GH_PAT}@github.com/${{ github.repository }}.git HEAD:master
|
||||
fi
|
||||
|
||||
# Force-push the tag to point to the commit with updated VERSION
|
||||
git tag -f "${version}"
|
||||
git push -f origin "${version}"
|
||||
git push -f https://x-access-token:${GH_PAT}@github.com/${{ github.repository }}.git "${version}"
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
Reference in New Issue
Block a user