Skip to content

git action artifact 수정 #11

git action artifact 수정

git action artifact 수정 #11

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI/CD with Gradle
on:
push:
branches:
- 'v*'
jobs:
build:
runs-on: self-hosted
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'liberica'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4.0.0
- name: Build java-agent
run: ./gradlew :java-agent:shadowJar
- name: Build server
run: ./gradlew :server:build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
java-agent/build/libs/*.jar
server/build/libs/*.jar
release:
runs-on: self-hosted
needs: build
permissions:
contents: write
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: List downloaded files
run: ls -R
- name: Create GitHub Release
id: create_release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
body: "Automated release for ${{ github.ref_name }}"
draft: false
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: |
**/traffic-hunter-*.jar