Skip to content

Bump actions/download-artifact from 2.0.9 to 4.1.7 in /.github/workflows #3

Bump actions/download-artifact from 2.0.9 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2.0.9 to 4.1.7 in /.github/workflows #3

Workflow file for this run

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:
- master
jobs:
Build_Release:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- 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\DevourMenu.dll DevourMenu.dll
move /y Release_Version\version.dll version.dll
tar -caf Release.zip DevourMenu.dll version.dll LICENSE
- name: Upload Release Artifact
if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v2.2.3
with:
name: Release
path: Release.zip
Build_Debug:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- 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\DevourMenu.dll DevourMenu.dll
move /y Debug_Version\version.dll version.dll
tar -caf Debug.zip DevourMenu.dll version.dll LICENSE
- name: Upload Debug Artifact
if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v2.2.3
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/download-artifact@v4.1.7
with:
name: Release
- name: Download Debug Artifact
uses: actions/download-artifact@v4.1.7
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/DevourMenu' }}
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/discord-webhook-notify@v1.0.4
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 }}