mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-07 23:13:24 +00:00
### 🔧 Improvements
- Added steps for automated version tagging in `version-and-publish.yml` - Configured workflow permissions for writing contents - Enhanced workflow to include git tag creation and push after build steps
This commit is contained in:
13
.github/workflows/version-and-publish.yml
vendored
13
.github/workflows/version-and-publish.yml
vendored
@@ -8,6 +8,8 @@ on:
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
@@ -30,6 +32,17 @@ jobs:
|
||||
- name: Run build
|
||||
run: pnpm build
|
||||
|
||||
- name: Get package version
|
||||
id: package-version
|
||||
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create and push git tag
|
||||
run: |
|
||||
git config user.name "GitHub Actions"
|
||||
git config user.email "actions@github.com"
|
||||
git tag -a "v${{ steps.package-version.outputs.version }}" -m "Release v${{ steps.package-version.outputs.version }}"
|
||||
git push origin "v${{ steps.package-version.outputs.version }}"
|
||||
|
||||
- name: Publish to NPM
|
||||
run: pnpm publish --access public --no-git-checks
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user