Skip to content

Commit

Permalink
solution: CI setup
Browse files Browse the repository at this point in the history
  • Loading branch information
splix authored Jan 8, 2025
1 parent d50a3d2 commit 568620e
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Publish

on:
release:
types: [created]

jobs:
publish-github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 21
- name: Check
uses: eskatos/gradle-command-action@v1
with:
arguments: check
- name: Build
uses: eskatos/gradle-command-action@v1
with:
arguments: build
- name: Sync Jars
uses: eskatos/gradle-command-action@v1
with:
arguments: syncJars
- name: Upload Jars
id: upload-release-asset
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ./build/libs/*.jar
file_glob: true

publish-gcp-artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 21
- name: Check
uses: eskatos/gradle-command-action@v1
with:
arguments: check
- name: Setup GCP
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_ARTIFACTS_KEY }}
export_default_credentials: true
- name: Upload to GCP
uses: eskatos/gradle-command-action@v1
with:
arguments: publish
32 changes: 32 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Tests

on:
# if pushed directly to the master
push:
branches:
- master
- release/*
- ci/*
# on a pull request
pull_request:
branches:
- master
- release/*
- ci/*

jobs:
unit-test:
name: Standard Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 21

- name: Check
uses: eskatos/gradle-command-action@v1
with:
arguments: check

0 comments on commit 568620e

Please sign in to comment.