Skip to content

Commit

Permalink
ci: release (draft) build action
Browse files Browse the repository at this point in the history
  • Loading branch information
rxchard authored Aug 5, 2024
1 parent cba2012 commit 7f0a2da
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
workflow_dispatch:

jobs:

build:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- run: mvn package

- uses: actions/upload-artifact@v4
with:
path: target/SilkSpawners_v2.jar

release:
runs-on: ubuntu-latest
needs: build

steps:

# https://github.com/actions/checkout/issues/1471
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0

- uses: actions/download-artifact@v4

- id: tag
run: echo "latest=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT

- run: echo ${{ steps.tag.outputs.latest }}

- uses: softprops/action-gh-release@v2
with:
draft: true
name: ${{ steps.tag.outputs.latest }}
tag_name: ${{ steps.tag.outputs.latest }}
files: artifact/*

0 comments on commit 7f0a2da

Please sign in to comment.