Skip to content

Commit

Permalink
新增workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rootphantomer committed Oct 25, 2022
1 parent 4e2625a commit 2707775
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: publish jar
on:
push:
tags:
- "v*"
permissions:
contents: write

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
cache: 'maven'
- name: Set version
run: mvn versions:set -DnewVersion=${{ github.ref_name }}
- name: Build jar
run: mvn -B clean package -DskipTests
# - name: publish maven jar
# run: mvn -B deploy -DskipTests -DrepositoryId=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish GitHub release
uses: softprops/action-gh-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: target/qiushui-${{ github.ref_name }}.jar

0 comments on commit 2707775

Please sign in to comment.