mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2025-11-14 05:53:46 +00:00
fix: release branch flow
This commit is contained in:
parent
e0e2bf9a35
commit
f0a8cb6541
3 changed files with 6 additions and 42 deletions
4
.github/workflows/checkPullRequest.yml
vendored
4
.github/workflows/checkPullRequest.yml
vendored
|
|
@ -3,7 +3,7 @@ name: Check Pull Request
|
|||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
release:
|
||||
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
- name: Semantic Release
|
||||
uses: ./
|
||||
with:
|
||||
branch: master
|
||||
branch: main
|
||||
extra_plugins: |
|
||||
@semantic-release/git
|
||||
@semantic-release/changelog
|
||||
|
|
|
|||
27
.github/workflows/release.yml
vendored
27
.github/workflows/release.yml
vendored
|
|
@ -5,10 +5,6 @@ on:
|
|||
branches:
|
||||
- release
|
||||
- master
|
||||
- next
|
||||
- next-major
|
||||
- alpha
|
||||
- beta
|
||||
|
||||
jobs:
|
||||
release:
|
||||
|
|
@ -27,16 +23,6 @@ jobs:
|
|||
'+([0-9])?(.{+([0-9]),x}).x',
|
||||
'release',
|
||||
'master',
|
||||
'next',
|
||||
'next-major',
|
||||
{
|
||||
name: 'beta',
|
||||
prerelease: true
|
||||
},
|
||||
{
|
||||
name: 'alpha',
|
||||
prerelease: true
|
||||
}
|
||||
]
|
||||
extra_plugins: |
|
||||
@semantic-release/git
|
||||
|
|
@ -45,19 +31,6 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Setup Node.js with GitHub Package Registry
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
registry-url: 'https://npm.pkg.github.com'
|
||||
scope: 'cycjimmy'
|
||||
|
||||
- name: Publish To GitHub Package Registry
|
||||
if: steps.semantic.outputs.new_release_published == 'true'
|
||||
run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
|
||||
- name: Push updates to branch for major version
|
||||
if: steps.semantic.outputs.new_release_published == 'true'
|
||||
run: "git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/v${{steps.semantic.outputs.new_release_major_version}}"
|
||||
|
|
|
|||
17
.github/workflows/testRelease.yml
vendored
17
.github/workflows/testRelease.yml
vendored
|
|
@ -3,7 +3,7 @@ name: Test Release
|
|||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- release
|
||||
- main
|
||||
push:
|
||||
|
||||
|
|
@ -26,18 +26,8 @@ jobs:
|
|||
branches: |
|
||||
[
|
||||
'+([0-9])?(.{+([0-9]),x}).x',
|
||||
'master',
|
||||
'main',
|
||||
'next',
|
||||
'next-major',
|
||||
{
|
||||
name: 'beta',
|
||||
prerelease: true
|
||||
},
|
||||
{
|
||||
name: 'alpha',
|
||||
prerelease: true
|
||||
}
|
||||
'release',
|
||||
'main'
|
||||
]
|
||||
extra_plugins: |
|
||||
@semantic-release/git
|
||||
|
|
@ -69,6 +59,7 @@ jobs:
|
|||
dry_run: true
|
||||
branches: |
|
||||
[
|
||||
'release',
|
||||
'main',
|
||||
{name: 'beta', prerelease: true},
|
||||
{name: 'alpha', prerelease: true}
|
||||
|
|
|
|||
Loading…
Reference in a new issue