Skip to content

Commit

Permalink
Change version, bump upload-artifact and create release
Browse files Browse the repository at this point in the history
  • Loading branch information
goulven04 committed Dec 25, 2024
1 parent 87b94b0 commit 619a8cd
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
shell: bash
run: |
version="${{ steps.short-sha.outputs.sha }}"
if [ "${{ github.event_name }}" == "release" ]; then
if [ "${{ github.ref_type }}" == "tag" ]; then
version=$(echo ${{ github.ref }} | sed 's/refs\/tags\/v//g')
fi
echo "version=$version" >> $GITHUB_OUTPUT
Expand All @@ -48,7 +48,19 @@ jobs:
- name: Build DLL
run: msbuild "CoFrance.sln" /p:VcpkgEnableManifest=true /p:Platform=x86 /p:Configuration=Release

- uses: actions/upload-artifact@v4
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: CoFrance.dll
path: Release/CoFrance.dll
path: Release/CoFrance.dll

- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
name: CoFrance version ${{ steps.get_version.outputs.version }}
prerelease: false
draft: true
files: |
Release/CoFrance.dll
config.toml

0 comments on commit 619a8cd

Please sign in to comment.