Skip to content

Commit a21ccb8

Browse files
authored
1 parent f8e25da commit a21ccb8

File tree

7 files changed

+554
-19
lines changed

7 files changed

+554
-19
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Automated approval
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- labeled
9+
10+
jobs:
11+
auto-approve:
12+
runs-on: ubuntu-latest
13+
if: (github.actor == 'developer-experience-bot[bot]') && (contains(join(github.event.pull_request.labels.*.name), 'snpashot'))
14+
steps:
15+
- name: auto-approve
16+
id: auto-approve
17+
uses: coveo/actions/auto-approve-action@main
18+
with:
19+
github-token: "${{ secrets.GITHUB_TOKEN }}"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2+
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3+
4+
name: Maven Package
5+
6+
on:
7+
# TODO: remove after release. This is a fail safe in case this workflow does not get triggered
8+
workflow_dispatch:
9+
release:
10+
types: [created]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: Set up JDK 11
22+
uses: actions/setup-java@v3
23+
with:
24+
java-version: '11'
25+
distribution: 'temurin'
26+
server-id: github
27+
28+
- name: Build with Maven
29+
run: mvn -B clean package --file pom.xml
30+
31+
- name: Publish to GitHub Packages Apache Maven
32+
run: mvn deploy
33+
env:
34+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
environment: 'Release'
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: '18'
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Get Release Token
24+
run: npm run get-token
25+
26+
- uses: actions/setup-java@v3
27+
name: Set up Java
28+
with:
29+
java-version: '11'
30+
distribution: 'adopt'
31+
32+
- name: Build Java package
33+
run: mvn clean package
34+
35+
- uses: google-github-actions/release-please-action@v3
36+
name: Release Java package
37+
with:
38+
release-type: maven
39+
package-name: release-please-action
40+
default-branch: main
41+
pull-request-title-pattern: 'chore${scope}: release${component} ${version} [skip-ci]'
42+
token: $RELEASE_TOKEN

0 commit comments

Comments
 (0)