diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-03-19 19:56:29 +0100 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2023-04-06 15:25:10 +0200 |
commit | bf32932fe3d6d1f598c754c1dde8d1e97892bedd (patch) | |
tree | 5c467a734e1e3babef62c1ee90400bc5acf66f4c /.github/workflows/release.yml | |
parent | 6f4c6f3e959977de0adfa0147b0279b89438f33a (diff) | |
download | NorthstarLauncher-bf32932fe3d6d1f598c754c1dde8d1e97892bedd.tar.gz NorthstarLauncher-bf32932fe3d6d1f598c754c1dde8d1e97892bedd.zip |
CI create release and upload files on tag (#439)v1.12.5-rc1
* CI create release and upload files on tag
On tag creation, this creates a new release and uploads the corresponding compiled launcher and debug files.
* Remove leftover `ls`
* Remove condition to not build RCs
Release candidates should also be built and uploaded. The condition for not building them was a leftover from copy-pasting code.
* Move condition to parent
* Make sure files are in root of zip
Previously they were in a subfolder inside the zip
* Remove leftover content from copy/paste
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r-- | .github/workflows/release.yml | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..2aca823e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,71 @@ +name: Build +on: + push: + tags: + - 'v*' + +permissions: + contents: write # Needed to write to GitHub draft release + +env: + NORTHSTAR_VERSION: ${{ github.ref_name }} + +jobs: + build-launcher: + runs-on: windows-2022 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v1.1 + - name: Setup resource file version + shell: bash + run: | + sed -i 's/DEV/${{ env.NORTHSTAR_VERSION }}/g' NorthstarLauncher/resources.rc + FILEVERSION=$(echo ${{ env.NORTHSTAR_VERSION }} | tr '.' ',' | sed -E 's/-rc[0-9]+//' | tr -d '[:alpha:]') + sed -i "s/0,0,0,1/${FILEVERSION}/g" NorthstarDLL/ns_version.h + - name: Build + run: | + msbuild /p:Configuration=Release R2Northstar.sln + - name: Upload launcher build as artifact + uses: actions/upload-artifact@v3 + with: + name: northstar-launcher + path: | + x64/Release/*.dll + x64/Release/*.exe + x64/Release/*.txt + - name: Upload debug build artifact + uses: actions/upload-artifact@v3 + with: + name: launcher-debug-files + path: | + x64/Release/*.pdb + + upload-launcher-to-release: + if: startsWith(github.ref, 'refs/tags/v') + needs: build-launcher + runs-on: ubuntu-22.04 + steps: + - name: Download compiled launcher + uses: actions/download-artifact@v2 + with: + name: northstar-launcher + path: northstar-launcher + - name: Download compiled launcher + uses: actions/download-artifact@v2 + with: + name: launcher-debug-files + path: launcher-debug-files + - name: Create zip to upload + run: | + zip --recurse-paths --quiet --junk-paths northstar-launcher.zip northstar-launcher/ + zip --recurse-paths --quiet --junk-paths launcher-debug-files.zip launcher-debug-files/ + - name: Upload files to release + uses: softprops/action-gh-release@v1 + with: + body: ":warning: These are development files! If you want to download Northstar, [go here instead](https://github.com/R2Northstar/Northstar/releases) :warning:" + draft: false + files: | + northstar-launcher.zip + launcher-debug-files.zip |