Workflow file for this run
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 Pre-Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*-pre-*' | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Install CMake and Ninja | |
uses: lukka/get-cmake@latest | |
- name: Configure the project | |
uses: threeal/cmake-action@v1.3.0 | |
with: | |
run-build: true | |
source-dir: NIAHttpBOT | |
build-dir: NIAHttpBOT | |
- name: Upload the exe file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NIAHttpBOT.exe | |
path: ./NIAhttpBOT/Debug/NIAHttpBOT.exe | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Install CMake and Ninja | |
uses: lukka/get-cmake@latest | |
- name: Configure the project | |
uses: threeal/cmake-action@v1.3.0 | |
with: | |
run-build: true | |
source-dir: NIAHttpBOT | |
build-dir: NIAHttpBOT | |
- name: Upload the executable file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NIAHttpBOT | |
path: ./NIAHttpBOT/NIAHttpBOT | |
zip: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Archive Release1 | |
uses: thedoctor0/zip-release@0.7.1 | |
with: | |
type: 'zip' | |
directory: 'development_behavior_packs/NIA_V4.0_BP' | |
path: '.' | |
filename: NiaServer-Core-BP-${{ github.ref_name }}.zip | |
- name: Upload the behavior_pack | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NiaServer-Core-BP-${{ github.ref_name }}.zip | |
path: ./development_behavior_packs/NIA_V4.0_BP/NiaServer-Core-BP-${{ github.ref_name }}.zip | |
- name: Archive Release2 | |
uses: thedoctor0/zip-release@0.7.1 | |
with: | |
type: 'zip' | |
directory: 'development_resource_packs/NIA_V4.0_RP' | |
path: '.' | |
filename: NiaServer-Core-RP-${{ github.ref_name }}.zip | |
- name: Upload the resource_pack | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NiaServer-Core-RP-${{ github.ref_name }}.zip | |
path: ./development_resource_packs/NIA_V4.0_RP/NiaServer-Core-RP-${{ github.ref_name }}.zip | |
release: | |
needs: [build-windows, build-linux, zip] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Download the exe file | |
uses: actions/download-artifact@v4 | |
with: | |
name: NIAHttpBOT.exe | |
- name: Remove existing directory | |
run: rm -rf ./NIAHttpBOT | |
- name: Download the Linux executable file | |
uses: actions/download-artifact@v4 | |
with: | |
name: NIAHttpBOT | |
- name: Download the behavior_pack | |
uses: actions/download-artifact@v4 | |
with: | |
name: NiaServer-Core-BP-${{ github.ref_name }}.zip | |
- name: Download the resource_pack | |
uses: actions/download-artifact@v4 | |
with: | |
name: NiaServer-Core-RP-${{ github.ref_name }}.zip | |
- name: Create and upload release | |
uses: ncipollo/release-action@v1.12.0 | |
with: | |
prerelease: true | |
artifacts: "NiaServer-Core-BP-${{ github.ref_name }}.zip,NiaServer-Core-RP-${{ github.ref_name }}.zip,NIAHttpBOT.exe,NIAHttpBOT,world_behavior_packs.json,world_resource_packs.json" | |
bodyFile: "CHANGELOG-PRE.md" | |
generateReleaseNotes: true | |
token: ${{ secrets.GITHUB_TOKEN }} |