Skip to content

(chore): remove user config #67

(chore): remove user config

(chore): remove user config #67

name: Release Package
on:
push:
branches: ["main"]
paths-ignore: ["!README.md"]
jobs:
build:
name: Build package
runs-on: ubuntu-latest
outputs:
new-version: ${{ steps.bumpVersion.outputs.new-version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Git configuration
run: |
git config --global user.email "${GH_USERNAME}@users.noreply.github.com"
git config --global user.name "${GH_USERNAME}"
env:
GH_USERNAME: ${{ github.actor }}
- run: npm ci
- run: npm run test
- run: npm run cleanup
- run: npm run build
- name: Bump Package Version
id: bumpVersion
run: |
npm run bumpVersion
PACKAGE_VERSION=$(node -p "require('./package.json').version")
echo "new-version=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
- name: Get new Version
id: newVersion
run: |
echo "New version number: ${{ steps.bumpVersion.outputs.new-version }}"
<<<<<<< Updated upstream

Check failure on line 44 in .github/workflows/release-package.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release-package.yml

Invalid workflow file

You have an error in your yaml syntax on line 44
- name: Commit changes
run: |
git add -A
git commit -s -m "chore: release ${{ needs.build.outputs.new-version }}"
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push origin main
=======
>>>>>>> Stashed changes
releaseNote:
needs: build
name: Create release notes
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Create release and tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ needs.build.outputs.new-version }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="${tag}" \
--generate-notes
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: (chore)':' release '-' ${{ needs.build.outputs.new-version }}
branch: main
publish-gpr:
needs: releaseNote
name: Publish package
if: github.repository_owner == 'josh-uvi' #safeguard for forks
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://npm.pkg.github.com/
scope: "@josh-uvi"
- name: start ci
run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}