Skip to content

Commit d4a9f9c

Browse files
committed
build: allow beta releases
1 parent b647b77 commit d4a9f9c

File tree

3 files changed

+31
-15
lines changed

3 files changed

+31
-15
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ on:
33
push:
44
branches:
55
- master
6+
- beta
67
pull_request:
78
branches:
89
- master
10+
- beta
911
jobs:
1012
build:
1113
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
@@ -22,15 +24,15 @@ jobs:
2224
env:
2325
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2426
- name: Set up NodeJS
25-
if: github.ref == 'refs/heads/master'
27+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/beta'
2628
uses: actions/setup-node@v4
2729
with:
2830
node-version-file: '.nvmrc'
2931
- name: Set up Semantic Release
30-
if: github.ref == 'refs/heads/master'
32+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/beta'
3133
run: npm -g install @semantic-release/git [email protected]
3234
- name: Semantic Release
33-
if: github.ref == 'refs/heads/master'
35+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/beta'
3436
3537
env:
3638
GITHUB_TOKEN: ${{ secrets.PA_TOKEN }}

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ jobs:
99
- uses: actions/checkout@v4
1010
- name: Set env
1111
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
12-
- name: Upgrade Gradle.properties
12+
- name: Upgrade gradle.properties
1313
run: sed -i 's/version=.*/version=${{ env.RELEASE_VERSION }}/g' gradle.properties
1414
- name: Generate Changelog
15+
if: github.event.release.prerelease == false
1516
uses: heinrichreimer/[email protected]
1617
with:
1718
token: ${{ secrets.GITHUB_TOKEN }}
@@ -36,6 +37,7 @@ jobs:
3637
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.MAVEN_USERNAME }}
3738
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.MAVEN_PASSWORD }}
3839
- name: Push Changelog
40+
if: github.event.release.prerelease == false
3941
uses: github-actions-x/[email protected]
4042
with:
4143
github-token: ${{ secrets.GITHUB_TOKEN }}

.releaserc

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
{
2-
"branches": ["master"],
3-
"plugins": [
4-
"@semantic-release/commit-analyzer",
5-
"@semantic-release/release-notes-generator",
6-
["@semantic-release/git",
7-
{
8-
"assets": [ { "path": "build/**/*", "label": "Compiled files" }],
2+
"branches": [
3+
"master",
4+
{
5+
"name": "beta",
6+
"prerelease": true
7+
}
8+
],
9+
"plugins": [
10+
"@semantic-release/commit-analyzer",
11+
"@semantic-release/release-notes-generator",
12+
[
13+
"@semantic-release/git",
14+
{
15+
"assets": [
16+
{
17+
"path": "build/**/*",
18+
"label": "Compiled files"
19+
}
20+
],
921
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
1022
}
11-
],
12-
"@semantic-release/github"
13-
]
14-
}
23+
],
24+
"@semantic-release/github"
25+
]
26+
}

0 commit comments

Comments
 (0)