Skip to content

Merge pull request #43 from Our-Magic-Journey/start #17

Merge pull request #43 from Our-Magic-Journey/start

Merge pull request #43 from Our-Magic-Journey/start #17

Workflow file for this run

name: Release
on:
push:
branches: [ "main" ]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: release
gradle-version: '7.3'
- name: Upload zip artifact
uses: actions/upload-artifact@v2
with:
name: nebula-quest-linux.zip
path: release/nebula-quest-linux.zip
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: release
gradle-version: '7.3'
- name: Upload zip artifact
uses: actions/upload-artifact@v2
with:
name: nebula-quest-windows.zip
path: release/nebula-quest-windows.zip
release:
needs: [linux, windows]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v2
- name: Display structure of downloaded files
run: ls -R
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Nebula Quest ${{ github.sha }}
draft: true
prerelease: false
- name: Upload linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: nebula-quest-linux.zip/nebula-quest-linux.zip
asset_name: nebula-quest-linux.zip
asset_content_type: application/zip
- name: Upload windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: nebula-quest-windows.zip/nebula-quest-windows.zip
asset_name: nebula-quest-windows.zip
asset_content_type: application/zip