mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2025-11-14 14:03:47 +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:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
branch: master
|
branch: main
|
||||||
extra_plugins: |
|
extra_plugins: |
|
||||||
@semantic-release/git
|
@semantic-release/git
|
||||||
@semantic-release/changelog
|
@semantic-release/changelog
|
||||||
|
|
|
||||||
27
.github/workflows/release.yml
vendored
27
.github/workflows/release.yml
vendored
|
|
@ -5,10 +5,6 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- release
|
- release
|
||||||
- master
|
- master
|
||||||
- next
|
|
||||||
- next-major
|
|
||||||
- alpha
|
|
||||||
- beta
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
|
@ -27,16 +23,6 @@ jobs:
|
||||||
'+([0-9])?(.{+([0-9]),x}).x',
|
'+([0-9])?(.{+([0-9]),x}).x',
|
||||||
'release',
|
'release',
|
||||||
'master',
|
'master',
|
||||||
'next',
|
|
||||||
'next-major',
|
|
||||||
{
|
|
||||||
name: 'beta',
|
|
||||||
prerelease: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'alpha',
|
|
||||||
prerelease: true
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
extra_plugins: |
|
extra_plugins: |
|
||||||
@semantic-release/git
|
@semantic-release/git
|
||||||
|
|
@ -45,19 +31,6 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_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
|
- name: Push updates to branch for major version
|
||||||
if: steps.semantic.outputs.new_release_published == 'true'
|
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}}"
|
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:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- release
|
||||||
- main
|
- main
|
||||||
push:
|
push:
|
||||||
|
|
||||||
|
|
@ -26,18 +26,8 @@ jobs:
|
||||||
branches: |
|
branches: |
|
||||||
[
|
[
|
||||||
'+([0-9])?(.{+([0-9]),x}).x',
|
'+([0-9])?(.{+([0-9]),x}).x',
|
||||||
'master',
|
'release',
|
||||||
'main',
|
'main'
|
||||||
'next',
|
|
||||||
'next-major',
|
|
||||||
{
|
|
||||||
name: 'beta',
|
|
||||||
prerelease: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'alpha',
|
|
||||||
prerelease: true
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
extra_plugins: |
|
extra_plugins: |
|
||||||
@semantic-release/git
|
@semantic-release/git
|
||||||
|
|
@ -69,6 +59,7 @@ jobs:
|
||||||
dry_run: true
|
dry_run: true
|
||||||
branches: |
|
branches: |
|
||||||
[
|
[
|
||||||
|
'release',
|
||||||
'main',
|
'main',
|
||||||
{name: 'beta', prerelease: true},
|
{name: 'beta', prerelease: true},
|
||||||
{name: 'alpha', prerelease: true}
|
{name: 'alpha', prerelease: true}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue