Compare commits

..
12 Commits
Author SHA1 Message Date
songyinyin 299d75957b test github action v15 2023-10-25 11:57:57 +08:00
songyinyin db13fb49b1 test github action v14 2023-10-25 11:42:02 +08:00
songyinyin 94cac52ad2 test github action v13 all os 2023-10-25 11:33:17 +08:00
songyinyin 32780f34a4 test github action v13 2023-10-25 11:14:44 +08:00
songyinyin 8dd58035a6 test github action v12 2023-10-25 10:58:21 +08:00
songyinyin ee55a4104a test github action v11 2023-10-25 10:53:55 +08:00
songyinyin 1651f2ca1c test github action v10 2023-10-25 10:50:38 +08:00
songyinyin ba93dcbeac test github action v09 2023-10-25 10:36:20 +08:00
songyinyin cbc7ea7d25 test github action v08 2023-10-25 10:33:24 +08:00
songyinyin e0c6885b03 test github action v07 2023-10-25 10:30:58 +08:00
songyinyin c6694b7dc8 test github action v06 2023-10-25 10:27:48 +08:00
songyinyin a2a5beaf5b test github action v05 2023-10-24 19:13:39 +08:00
3 changed files with 165 additions and 70 deletions
-70
View File
@@ -1,70 +0,0 @@
name: jar release
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
build:
strategy:
fail-fast: true
matrix:
# 'ubuntu-latest', 'windows-latest', 'macos-latest'
# os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
os: ['ubuntu-latest']
name: build - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
# https://github.com/softprops/action-gh-release/issues/236#issuecomment-1150530128
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: GitHub Action for GraalVM JDK 17
uses: graalvm/setup-graalvm@v1
with:
java-version: '17.0.7' # for a specific JDK 17; or '17' for the latest JDK 17
distribution: 'graalvm' # New 'distribution' option
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven (neutrino-proxy-server)
run: |
mvn clean install -pl neutrino-proxy-core -am -DskipTests --no-transfer-progress package
cd neutrino-proxy-server
mvn clean package --file pom.xml --no-transfer-progress package
cp target/neutrino-proxy-server.jar ./../
- name: Build with Maven (neutrino-proxy-client)
run: |
cd neutrino-proxy-client
mvn clean package --file pom.xml --no-transfer-progress package
cp target/neutrino-proxy-client.jar ./../
# 上传构建产物
- name: Upload artifact (neutrino-proxy-server)
uses: actions/[email protected]
with:
name: neutrino-proxy-server
path:
neutrino-proxy-server.jar
- name: Upload artifact (neutrino-proxy-client)
uses: actions/[email protected]
with:
name: neutrino-proxy-client
path:
neutrino-proxy-client.jar
# GitHub 上创建 release
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
neutrino-proxy-server.jar
neutrino-proxy-client.jar
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
+82
View File
@@ -0,0 +1,82 @@
name: jar release
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
build:
strategy:
fail-fast: false
matrix:
# see: https://docs.github.com/zh/actions/using-jobs/choosing-the-runner-for-a-job
os: ['ubuntu-20.04', 'macos-12']
name: build - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
# https://github.com/softprops/action-gh-release/issues/236#issuecomment-1150530128
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: setup node v13.12.0
uses: actions/setup-node@v3
with:
node-version: 13.12.0
# cache: 'npm' # 使用缓存需要把 package-lock.json 也上传到 git 上
- name: build neutrino-proxy-admin
run: |
cd neutrino-proxy-admin
npm install
npm run build:dev
cp -rf ./dist/ ./../neutrino-proxy-server/src/main/resources/static/
- name: GitHub Action for GraalVM JDK 17
uses: graalvm/setup-graalvm@v1
with:
java-version: '17.0.7' # for a specific JDK 17; or '17' for the latest JDK 17
distribution: 'graalvm' # New 'distribution' option
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven (neutrino-proxy-server)
run: |
mvn clean install -pl neutrino-proxy-core -am -DskipTests --no-transfer-progress
cd neutrino-proxy-server
mvn clean native:compile -P native --file pom.xml --no-transfer-progress
cp target/neutrino-proxy-server ./../
- name: Archive zip (neutrino-proxy-server)
uses: thedoctor0/zip-release@master
with:
type: 'zip'
path: 'neutrino-proxy-server'
filename: neutrino-proxy-server-${{ matrix.os }}-${{ github.ref }}.zip
- name: Build with Maven (neutrino-proxy-client)
run: |
cd neutrino-proxy-client
mvn clean package --file pom.xml --no-transfer-progress
mvn clean native:compile -P native --file pom.xml --no-transfer-progress
cp target/neutrino-proxy-client ./../
- name: Archive zip (neutrino-proxy-client)
uses: thedoctor0/zip-release@master
with:
type: 'zip'
path: 'neutrino-proxy-client'
filename: neutrino-proxy-client-${{ matrix.os }}-${{ github.ref }}.zip
# GitHub 上创建 release
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
neutrino-proxy-server/target/neutrino-proxy-server.jar
neutrino-proxy-client/target/neutrino-proxy-client.jar
neutrino-proxy-server-${{ matrix.os }}-${{ github.ref }}.zip
neutrino-proxy-client-${{ matrix.os }}-${{ github.ref }}.zip
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
+83
View File
@@ -0,0 +1,83 @@
name: jar release
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
build:
strategy:
fail-fast: false
matrix:
# see: https://docs.github.com/zh/actions/using-jobs/choosing-the-runner-for-a-job
# os: ['ubuntu-20.04', 'windows-latest', 'macos-latest']
os: ['windows-2022']
name: build - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
# https://github.com/softprops/action-gh-release/issues/236#issuecomment-1150530128
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: setup node v13.12.0
uses: actions/setup-node@v3
with:
node-version: 13.12.0
# cache: 'npm' # 使用缓存需要把 package-lock.json 也上传到 git 上
- name: build neutrino-proxy-admin
run: |
cd neutrino-proxy-admin
npm install
npm run build:dev
xcopy /s /i ./dist/ ./../neutrino-proxy-server/src/main/resources/static/
- name: GitHub Action for GraalVM JDK 17
uses: graalvm/setup-graalvm@v1
with:
java-version: '17.0.7' # for a specific JDK 17; or '17' for the latest JDK 17
distribution: 'graalvm' # New 'distribution' option
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven (neutrino-proxy-server)
run: |
mvn clean install -pl neutrino-proxy-core -am -DskipTests --no-transfer-progress
cd neutrino-proxy-server
mvn clean native:compile -P native --file pom.xml --no-transfer-progress
xcopy target/neutrino-proxy-server ./../
- name: Archive zip (neutrino-proxy-server)
uses: thedoctor0/zip-release@master
with:
type: 'zip'
path: 'neutrino-proxy-server'
filename: neutrino-proxy-server-${{ matrix.os }}-${{ github.ref }}.zip
- name: Build with Maven (neutrino-proxy-client)
run: |
cd neutrino-proxy-client
mvn clean package --file pom.xml --no-transfer-progress
mvn clean native:compile -P native --file pom.xml --no-transfer-progress
xcopy target/neutrino-proxy-client ./../
- name: Archive zip (neutrino-proxy-client)
uses: thedoctor0/zip-release@master
with:
type: 'zip'
path: 'neutrino-proxy-client'
filename: neutrino-proxy-client-${{ matrix.os }}-${{ github.ref }}.zip
# GitHub 上创建 release
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
neutrino-proxy-server/target/neutrino-proxy-server.jar
neutrino-proxy-client/target/neutrino-proxy-client.jar
neutrino-proxy-server-${{ matrix.os }}-${{ github.ref }}.zip
neutrino-proxy-client-${{ matrix.os }}-${{ github.ref }}.zip
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}