Skip to content

feat: Release CI/CD #118

feat: Release CI/CD

feat: Release CI/CD #118

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- run: gradle wrapper --no-daemon
- run: ./gradlew build detekt --no-daemon -Ptargets=linuxX64
build:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- run: gradle wrapper --no-daemon
- run: ./gradlew build -x check --no-daemon
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: build
release:
runs-on: macos-14
# if: github.ref == 'refs/heads/main'
# needs:
# - test
# - build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- run: gpg --list
# - name: Download build artifacts
# uses: actions/download-artifact@v4
# with:
# name: build
# - run: gradle wrapper --no-daemon
# - run: ./gradlew publishAllPublicationsToSonatypeRepository -x check --no-daemon
# - name: Create release
# env:
# tag: ${{ github.ref_name }}
# run: |
# export tag=$(cat version.txt)
# gh release create "$tag" \
# --repo="$GITHUB_REPOSITORY" \
# --title="${GITHUB_REPOSITORY#*/} $tag" \
# --generate-notes