-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# DO NOT use it unless you know what are you doing | ||
# Manual testing prob don't need caching because this workflow is intended to fixing bugs | ||
name: Gradle Package (Manual) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
pv: | ||
description: Maven package version | ||
required: true | ||
default: 0.0.1 | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
env: | ||
# For stuff need our private packages | ||
# USERNAME: ${{ secrets.SERVICE_ID }} | ||
# TOKEN: ${{ secrets.SERVICE_PAT }} | ||
# For stuff that doesn't need our private packages | ||
USERNAME: ${{ github.actor }} | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
VERSION: ${{ github.event.inputs.pv }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 16 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '16' | ||
distribution: 'adopt' | ||
server-id: github | ||
settings-path: ${{ github.workspace }} | ||
- name: Gradle build | ||
run: gradle build | ||
- name: Gradle test | ||
run: gradle test | ||
- name: Publish to GitHub Packages | ||
run: gradle publish |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Gradle Release Package | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
env: | ||
# For stuff need our private packages | ||
# USERNAME: ${{ secrets.SERVICE_ID }} | ||
# TOKEN: ${{ secrets.SERVICE_PAT }} | ||
# For stuff that doesn't need our private packages | ||
USERNAME: ${{ github.actor }} | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Set VERSION variable from tag | ||
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 16 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '16' | ||
distribution: 'adopt' | ||
server-id: github | ||
cache: 'gradle' | ||
settings-path: ${{ github.workspace }} | ||
- name: Gradle build | ||
run: gradle build | ||
- name: Gradle test | ||
run: gradle test | ||
- name: Publish to GitHub Packages | ||
run: gradle publish |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Gradle Snapshot Package | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
- staging | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
env: | ||
# For stuff need our private packages | ||
# USERNAME: ${{ secrets.SERVICE_ID }} | ||
# TOKEN: ${{ secrets.SERVICE_PAT }} | ||
# For stuff that doesn't need our private packages | ||
USERNAME: ${{ github.actor }} | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Set SNAPSHOT version from latest release | ||
run: | | ||
echo "Fetching version information..." | ||
tag=$(curl --silent "https://api.github.com/repos/${{ github.event.repository.full_name }}/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")') | ||
echo "BASE_VERSION=${tag/v/}" >> $GITHUB_ENV | ||
ts=$(date +%s) | ||
echo "VERSION=${tag/v/}-SNAPSHOT-${ts}" >> $GITHUB_ENV | ||
echo "Package version: ${tag/v/}-SNAPSHOT-${ts}" | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 16 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '16' | ||
distribution: 'adopt' | ||
server-id: github | ||
cache: 'gradle' | ||
settings-path: ${{ github.workspace }} | ||
- name: Gradle build | ||
run: gradle build | ||
- name: Gradle test | ||
run: gradle test | ||
- name: Publish to GitHub Packages | ||
run: gradle publish | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/build | ||
.gradle | ||
run | ||
.pat | ||
*.iml | ||
.idea/*.xml | ||
|
||
|
||
# By .idea - somehow that file not work for me | ||
/shelf/ | ||
/workspace.xml | ||
/dataSources/ | ||
/dataSources.local.xml | ||
/httpRequests/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.