fix(github act): os. #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
discussions: write | |
jobs: | |
minecraft-main: | |
name: Compile | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
- name: Set up JDK 21 for x64 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
architecture: x64 | |
- name: Get Next Version | |
id: semver | |
uses: ietf-tools/semver-action@v1 | |
with: | |
token: ${{ github.token }} | |
branch: main | |
- name: Compile with maven | |
run: | | |
EW_VERSION=${{ steps.semver.outputs.next }} | |
mvn --batch-mode --update-snapshots package | |
- name: Create artifact directory | |
shell: bash | |
run: | | |
directory=easywarp | |
mkdir $directory | |
cp README.md LICENSE $directory | |
cp target/easywarp-*.jar $directory | |
tar cJf $directory.tar.xz $directory | |
- name: Create a Release [${{ steps.semver.outputs.next }}] | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
tag_name: ${{ steps.semver.outputs.next }} | |
generate_release_notes: true | |
files: | | |
easywarp.tar.* | |
- name: Create a Release [Latest] | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
tag_name: latest | |
generate_release_notes: true | |
files: | | |
easywarp.tar.* | |