Skip to content

Commit

Permalink
#19 modified GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ByungJun25 committed Feb 16, 2021
1 parent 2e61ece commit 777418f
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/issue-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Spring Instant CI with Maven
name: Spring Instant [Issue] CI with Maven

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Spring Instant CI with Maven
name: Spring Instant [Main] CI with Maven

on:
push:
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/rc-deploy.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/release-deploy.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/tag-rc-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Spring Instant [Tag - Release Candidate] Maven package

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'rc*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
create-prerelease:
name: Create Prerelease
runs-on: ubuntu-latest
steps:
- name: echo create prerelease job start
run: echo create prerelease job start

- name: Checkout code
uses: actions/checkout@v2

- name: Create Prerelease
id: create_prerelease
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ github.token }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Prerelease ${{ github.ref }}
body: |
Prerelease ${{ github.ref }}
draft: false
prerelease: true

build-deploy:
name: deploy GitHub Maven Package
runs-on: ubuntu-latest

steps:
- name: echo build and deploy job start
run: echo build and deploy job start

- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Build with Maven
run: mvn -B package -PRC --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -PRC
env:
GITHUB_TOKEN: ${{ github.token }}
56 changes: 56 additions & 0 deletions .github/workflows/tag-release-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Spring Instant [Tag - Release] Maven package

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: echo create release job start
run: echo create release job start

- name: Checkout code
uses: actions/checkout@v2

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ github.token }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Release ${{ github.ref }}
draft: false
prerelease: false

build-deploy:
name: deploy GitHub Maven Package
runs-on: ubuntu-latest

steps:
- name: echo build and deploy job start
run: echo build and deploy job start

- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Build with Maven
run: mvn -B package -PRelease --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -PRelease
env:
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit 777418f

Please sign in to comment.