From 56be45cc94a0ae31fe256db85cd4e8fc0d2839b2 Mon Sep 17 00:00:00 2001 From: Alan Bridgeman Date: Wed, 18 Jun 2025 05:03:17 -0500 Subject: [PATCH] Changed automation from GitHub to Forgejo + some small improvements --- {.github => .forgejo}/workflows/publish.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) rename {.github => .forgejo}/workflows/publish.yml (84%) diff --git a/.github/workflows/publish.yml b/.forgejo/workflows/publish.yml similarity index 84% rename from .github/workflows/publish.yml rename to .forgejo/workflows/publish.yml index 082ef9b..d277eb4 100644 --- a/.github/workflows/publish.yml +++ b/.forgejo/workflows/publish.yml @@ -7,17 +7,13 @@ on: jobs: publish: - runs-on: ubuntu-latest + runs-on: default steps: # Checkout the repository - name: Checkout code uses: actions/checkout@v3 - # Set up NPM Auth Token - - name: Set up NPM Auth Token - run: echo "NODE_AUTH_TOKEN=${{ secrets.NPM_TOKEN }}" >> $GITHUB_ENV - # Set up NPM Auth Token - name: Set up NPM Auth Token run: echo "NODE_AUTH_TOKEN=${{ secrets.NPM_TOKEN }}" >> $GITHUB_ENV @@ -77,10 +73,18 @@ jobs: - name: Commit Version Change (if needed) if: steps.version_check.outputs.version_changed == 'true' run: | - git config user.name "GitHub Actions" - git config user.email "actions@github.com" + # Update remote URL to use the GITHUB_TOKEN for authentication + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@git.bridgemanaccessible.ca/${{ github.repository }}.git + + # Setup git user details for committing the version change + git config user.name "Forgejo Actions" + git config user.email "actions@git.bridgemanaccessible.ca" + + # Commit the version change to the `package.json` file git add package.json - git commit -m "[Github Actions] Update version to ${{ env.new_version }}" + git commit -m "[Forgejo Actions] Update version to ${{ env.new_version }}" + + # Push the changes to the repository git push origin HEAD:main # Publish to private NPM registry