Browse Source

chore: setup automated release by github actions

pull/5/head
Hiroyuki Wada 4 years ago
parent
commit
7963dc9f9a
  1. 24
      .github/workflows/pull_request.yml
  2. 43
      .github/workflows/release.yml
  3. 13
      .releaserc
  4. 2
      ear/pom.xml
  5. 2
      ejb/pom.xml
  6. 2
      pom.xml

24
.github/workflows/pull_request.yml

@ -0,0 +1,24 @@
name: Pull Request CI
on: [pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache for maven
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B package

43
.github/workflows/release.yml

@ -0,0 +1,43 @@
name: Release CI
on:
push:
branches:
- master
jobs:
build:
name: Build and release
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup node 10
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Cache for maven
uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache for npm
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('.github/workflows/release.yml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup semantic-release
run: npm install -g @conveyal/maven-semantic-release semantic-release@15 @semantic-release/exec@v3.3.8
- name: Release
run: semantic-release --use-conveyal-workflow --skip-maven-deploy
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

13
.releaserc

@ -0,0 +1,13 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@conveyal/maven-semantic-release",
["@semantic-release/github", {
"assets": [
{"path": "ear/target/*.ear"}
]
}]
]
}

2
ear/pom.xml

@ -3,7 +3,7 @@
<parent>
<groupId>org.keycloak.extensions</groupId>
<artifactId>keycloak-discord-parent</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.2.1-SNAPSHOT</version>
</parent>
<name>Keycloak Discord EAR</name>

2
ejb/pom.xml

@ -3,7 +3,7 @@
<parent>
<groupId>org.keycloak.extensions</groupId>
<artifactId>keycloak-discord-parent</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.2.1-SNAPSHOT</version>
</parent>
<name>Keycloak Discord EJB</name>

2
pom.xml

@ -7,7 +7,7 @@
<groupId>org.keycloak.extensions</groupId>
<artifactId>keycloak-discord-parent</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.2.1-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>

Loading…
Cancel
Save