Skip to content

Commit

Permalink
restored
Browse files Browse the repository at this point in the history
  • Loading branch information
silveltman committed Sep 26, 2024
1 parent 52ee887 commit 51f77d9
Showing 1 changed file with 8 additions and 28 deletions.
36 changes: 8 additions & 28 deletions .github/workflows/github-releases-to-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 51f77d9

Please sign in to comment.