This repository has been archived by the owner on Oct 10, 2024. It is now read-only.
Update to 2023.10.24 #613
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 Project | |
on: | |
push: | |
tags: | |
- v[0-9].[0-9]+.[0-9]+* | |
# pr's will trigger this action. i think the idea here is to verify that a build is passing before merging. | |
pull_request: | |
branches: | |
- main | |
jobs: | |
Build_Release: | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Build Release | |
shell: bash | |
run: '"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Msbuild/Current/Bin/MSBuild.exe" -property:Configuration=Release' | |
- name: Build Release_Version | |
shell: bash | |
run: '"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Msbuild/Current/Bin/MSBuild.exe" -property:Configuration=Release_Version' | |
- name: Package Release Builds | |
if: ${{ github.event_name == 'push' }} | |
shell: cmd | |
run: | | |
move /y Release\AmongUsMenu.dll AmongUsMenu.dll | |
move /y Release_Version\version.dll version.dll | |
tar -caf Release.zip AmongUsMenu.dll version.dll LICENSE | |
- name: Upload Release Artifact | |
if: ${{ github.event_name == 'push' }} | |
uses: actions/[email protected] | |
with: | |
name: Release | |
path: Release.zip | |
Build_Debug: | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Build Debug | |
shell: bash | |
run: '"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Msbuild/Current/Bin/MSBuild.exe" -property:Configuration=Debug' | |
- name: Build Debug_Version | |
shell: bash | |
run: '"C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Msbuild/Current/Bin/MSBuild.exe" -property:Configuration=Debug_Version' | |
- name: Package Debug Builds | |
if: ${{ github.event_name == 'push' }} | |
shell: cmd | |
run: | | |
move /y Debug\AmongUsMenu.dll AmongUsMenu.dll | |
move /y Debug_Version\version.dll version.dll | |
tar -caf Debug.zip AmongUsMenu.dll version.dll LICENSE | |
- name: Upload Debug Artifact | |
if: ${{ github.event_name == 'push' }} | |
uses: actions/[email protected] | |
with: | |
name: Debug | |
path: Debug.zip | |
AutoRelease: | |
if: ${{ github.event_name == 'push' }} | |
runs-on: windows-2022 | |
needs: [Build_Release, Build_Debug] | |
steps: | |
- name: Parse tag semver | |
uses: booxmedialtd/ws-action-parse-semver@3576f3a20a39f8752fe0d8195f5ed384090285dc | |
id: semver_parser | |
with: | |
input_string: ${{ github.ref }} | |
version_extractor_regex: '\/v(.*)$' | |
# please keep this for an adjustment period, will help diagnose any issues | |
- name: Debug semver | |
run: | | |
echo 'major: ${{ steps.semver_parser.outputs.major }}' | |
echo 'minor: ${{ steps.semver_parser.outputs.minor }}' | |
echo 'patch: ${{ steps.semver_parser.outputs.patch }}' | |
echo 'feature (is pre-release?): ${{ steps.semver_parser.outputs.prerelease }}' | |
echo 'feature ver: ${{ steps.semver_parser.outputs.build }}' | |
echo 'full: ${{ steps.semver_parser.outputs.fullversion }}' | |
echo 'is pre-release: ${{ steps.semver_parser.outputs.prerelease != 0 }}' | |
- name: Download Release Artifact | |
uses: actions/[email protected] | |
with: | |
name: Release | |
- name: Download Debug Artifact | |
uses: actions/[email protected] | |
with: | |
name: Debug | |
- name: Automatic Releases | |
if: ${{ github.event_name == 'push' }} | |
uses: marvinpinto/action-automatic-releases@526ce12c6675bbe6e0e9a4169c90d09a3f7ad3e2 | |
id: "automatic_releases" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: ${{ steps.semver_parser.outputs.prerelease != 0 }} | |
files: | | |
Release.zip | |
Debug.zip | |
Notification: | |
if: ${{ github.event_name == 'push' && github.repository == 'BitCrackers/AmongUsMenu' }} | |
runs-on: ubuntu-latest | |
needs: [AutoRelease] | |
steps: | |
- name: Parse tag into env | |
# credit: mcraiha via [https://github.community/t/how-to-get-just-the-tag-name/16241/17] | |
id: get_tag | |
shell: bash | |
run: echo ::set-output name=THIS_TAG::${GITHUB_REF/refs\/tags\//} | |
- name: Debug tag parsing | |
run: echo '${{ steps.get_tag.outputs.THIS_TAG }}' | |
- name: Discord Notification | |
uses: rjstone/[email protected] | |
with: | |
severity: info | |
description: "Project Build" | |
# note: we could also link directly to the asset, but that might not be very user-friendly | |
details: "${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ steps.get_tag.outputs.THIS_TAG }}" | |
webhookUrl: ${{ secrets.DISCORD_BUILD_WEBHOOK }} |