Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tachibanayui committed Sep 3, 2021
0 parents commit ee56a90
Show file tree
Hide file tree
Showing 29 changed files with 1,229 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/gradle-manual-publish.yml
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
38 changes: 38 additions & 0 deletions .github/workflows/gradle-release.yml
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
51 changes: 51 additions & 0 deletions .github/workflows/gradle-snapshot.yml
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

14 changes: 14 additions & 0 deletions .gitignore
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/
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/runConfigurations/Publish_to_maven_local.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/runConfigurations/Test.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/runConfigurations/build.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/runConfigurations/invalidate-pat.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/runConfigurations/setup-localhost.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/runConfigurations/setup-localmaven.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 75 additions & 0 deletions .idea/runConfigurations/setup-pat.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ee56a90

Please sign in to comment.