Skip to content

Commit

Permalink
t push
Browse files Browse the repository at this point in the history
  • Loading branch information
serivesmejia committed Sep 22, 2024
2 parents 0940443 + 48ffd9f commit 2b32746
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Create GitHub release(s)

on:
push:
branches: [ master ]
tags: 'v*'

jobs:
build-and-release:
if: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref != 'ref/heads/master' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '13'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build release shadow jar with Gradle
run: ./gradlew -Penv=release shadowJar -x test
if: ${{ startsWith(github.ref, 'refs/tags/v') }}

- name: Build dev shadow jar with Gradle
run: |
SHA_SHORT="$(git rev-parse --short HEAD)"
./gradlew -Phash=$SHA_SHORT shadowJar -x test
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}

- uses: pyTooling/Actions/releaser@r0
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: 'Dev'
rm: true
files: |
EOCVSimPlugin/build/libs/*.jar
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/v')}}

- uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: 'EOCVSimPlugin/build/libs/*.jar'

0 comments on commit 2b32746

Please sign in to comment.