Merge pull request #2 from bennetrr/main #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
name: Build and release | |
on: | |
push: | |
branches: | |
- release | |
jobs: | |
setup: | |
name: Setup | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
outputs: | |
version: ${{ steps.get-release-version.outputs.version }} | |
version-name: ${{ steps.get-release-version.outputs.version-name }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get release version | |
id: get-release-version | |
uses: wemogy/get-release-version-action@v4.3.2 | |
with: | |
prefix: v | |
create-tag: 'true' | |
git-username: bennetrr | |
git-email: bennet@ranft.ing | |
mode: semantic | |
build-standard: | |
name: Build standard edition | |
needs: [ setup ] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build modpack | |
uses: ./.github/actions/build-modpack | |
with: | |
edition: standard | |
version: ${{ needs.setup.outputs.version }} | |
build-plus: | |
name: Build plus edition | |
needs: [ setup ] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build modpack | |
uses: ./.github/actions/build-modpack | |
with: | |
edition: plus | |
version: ${{ needs.setup.outputs.version }} | |
github-release: | |
name: Create GitHub release | |
needs: | |
- setup | |
- build-standard | |
- build-plus | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
merge-multiple: true | |
- name: Create GitHub release | |
uses: ncipollo/release-action@v1 | |
with: | |
name: Version ${{ needs.setup.outputs.version }} | |
tag: ${{ needs.setup.outputs.version-name }} | |
generateReleaseNotes: true | |
commit: ${{ github.head_ref || github.ref_name }} | |
artifacts: artifacts/* |