-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix release creation to include assets (#3)
- Loading branch information
1 parent
5758fd4
commit f920d59
Showing
1 changed file
with
34 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,7 @@ jobs: | |
- name: macOS | ||
os: macos-latest | ||
runtime-id: osx-x64 | ||
artifact-name: osx-x64 | ||
artifact-name: macos-x64 | ||
|
||
name: Build and test on ${{ matrix.name }} | ||
|
||
|
@@ -85,7 +85,7 @@ jobs: | |
run: dotnet test --no-build -c Release --verbosity normal | ||
|
||
- name: Publish | ||
run: dotnet publish Stack/Stack.csproj -c Release -r ${{ matrix.runtime-id }} -p:Version=${{ needs.version.outputs.version }} -o ${{ github.workspace }}/publish | ||
run: dotnet publish Stack/Stack.csproj -c Release -r ${{ matrix.runtime-id }} -p:Version=${{ needs.version.outputs.version }} -p:DebugType=None -p:DebugSymbols=false -o ${{ github.workspace }}/publish | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -95,18 +95,44 @@ jobs: | |
path: ${{ github.workspace }}/publish | ||
|
||
publish: | ||
name: Publish release version | ||
name: Publish | ||
needs: [version, build] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- name: Download artifact | ||
- name: Download linux artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: ${{ github.workspace }}/publish | ||
name: linux-x64 | ||
path: ${{ github.workspace }}/artifacts/linux-x64 | ||
|
||
- name: Download windows artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: windows-x64 | ||
path: ${{ github.workspace }}/artifacts/windows-x64 | ||
|
||
- name: Download macOS artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: macos-x64 | ||
path: ${{ github.workspace }}/artifacts/macos-x64 | ||
|
||
- run: mkdir -p ${{ github.workspace }}/publish | ||
|
||
- name: Zip linux artifact | ||
run: zip -r ${{ github.workspace }}/publish/linux-x64.zip ${{ github.workspace }}/artifacts/linux-x64 | ||
|
||
- name: Zip windows artifact | ||
run: zip -r ${{ github.workspace }}/publish/windows-x64.zip ${{ github.workspace }}/artifacts/windows-x64 | ||
|
||
- name: Zip macOS artifact | ||
run: zip -r ${{ github.workspace }}/publish/macos-x64.zip ${{ github.workspace }}/artifacts/macos-x64 | ||
|
||
- name: List published artifacts | ||
run: ls -R ${{ github.workspace }}/publish | ||
|
||
- name: Create tag | ||
uses: actions/[email protected] | ||
|
@@ -118,6 +144,7 @@ jobs: | |
ref: 'refs/tags/v${{ needs.version.outputs.version }}', | ||
sha: context.sha | ||
}) | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
|
||
- name: Create release | ||
id: create_release | ||
|
@@ -127,3 +154,4 @@ jobs: | |
draft: false | ||
prerelease: false | ||
files: ${{ github.workspace }}/publish/* | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' |