-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52ee887
commit 51f77d9
Showing
1 changed file
with
8 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,48 +10,28 @@ jobs: | |
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Configure and Authenticate Git | ||
- name: Configure Git | ||
run: | | ||
git config user.name 'fulldev-bot' | ||
git config user.email '[email protected]' | ||
- name: Authenticate with Git | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
run: | | ||
git config --global user.name 'fulldev-bot' | ||
git config --global user.email '[email protected]' | ||
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | ||
echo "Git configuration and authentication completed" | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Set and push version from release tag | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
run: | | ||
echo "Debugging: Current Git config" | ||
git config --list | ||
echo "Debugging: Current branch" | ||
git branch --show-current | ||
git checkout -b main | ||
VERSION=${GITHUB_REF#refs/tags/v} | ||
echo "Setting version to $VERSION" | ||
npm version $VERSION --no-git-tag-version | ||
git add . | ||
git -c user.name="fulldev-bot" -c user.email="[email protected]" commit -m "Bump to $VERSION" | ||
echo "Debugging: Git status" | ||
git status | ||
echo "Attempting to push to main" | ||
git push origin HEAD:main || echo "Push failed" | ||
echo "Debugging: Git log" | ||
git log -n 5 --oneline | ||
- run: npm ci | ||
git commit -m "Bump to $VERSION" | ||
git push --set-upstream origin main | ||
- run: npm publish --provenance --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |