Skip to content

Commit a42e4ea

Browse files
authored
Update main.yml
1 parent 01145ab commit a42e4ea

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
name: Semantic Release
1+
name: Release
22

3-
on: [workflow_dispatch]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
- next
9+
- next-major
10+
- alpha
11+
- beta
412

513
jobs:
614
release:
@@ -11,7 +19,7 @@ jobs:
1119
uses: actions/checkout@v3
1220

1321
- name: Semantic Release
14-
uses: cycjimmy/semantic-release-action@v3
22+
uses: ./
1523
id: semantic
1624
with:
1725
branches: |
@@ -31,10 +39,16 @@ jobs:
3139
}
3240
]
3341
extra_plugins: |
34-
@semantic-release/commit-analyzer
3542
@semantic-release/git
3643
@semantic-release/changelog
37-
@semantic-release/exec
3844
env:
3945
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40-
SEMANTIC_RELEASE_PACKAGE: Laravel Addressable
46+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
47+
48+
49+
50+
- name: Push updates to branch for major version
51+
if: steps.semantic.outputs.new_release_published == 'true'
52+
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}}"
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)