Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release workflow #147

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 26 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,8 @@ on:
# branches: [ develop ]

jobs:
release:
name: Create release draft
runs-on: ubuntu-latest
steps:
- name: Create release draft
uses: softprops/action-gh-release@v2
with:
draft: true

build:
name: Build and upload to assets
needs: [release]
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -67,6 +57,7 @@ jobs:
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Extract version and set to github env
run: ./gradlew -PengineVersion=${{ matrix.es-version }} printVersionForGithubActions
env:
Expand All @@ -75,14 +66,34 @@ jobs:
run: ./gradlew -PengineVersion=${{ matrix.es-version }} --info clean build koverXmlReport
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload built package
uses: softprops/action-gh-release@v2
uses: actions/upload-artifact@v4
with:
draft: true
files: build/distributions/*.zip
name: artifact-${{ matrix.es-version }}
path: build/distributions/*.zip
- name: Upload SPI jar
if: env.mainJob == 'true'
uses: actions/upload-artifact@v4
with:
name: artifact-spi
path: spi/build/libs/sudachi-*.jar

release-draft:
name: Create release draft
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: artifact-*
path: dist/
merge-multiple: true
- name: List files to upload
run: ls -R dist/
- name: Create release draft with assets
uses: softprops/action-gh-release@v2
with:
draft: true
files: spi/build/libs/sudachi-*.jar
files: dist/*