Skip to content

Commit

Permalink
ci: test
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxuser committed Jan 3, 2025
1 parent 16ba6b2 commit bec3ff9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ jobs:
dotnet-version: 8.0.x
- name: Build
run: dotnet build src\DurangoInteropDotnet.csproj -property:Configuration=Release
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: win-release-artifacts
path: src/bin/Release/net8.0-windows/**
34 changes: 22 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
name: Create Release

on:
push:
tags:
- "v*"
workflow_run:
workflows: ["Build"]
types: [completed]

permissions:
contents: write
actions: read

jobs:
release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK 8.0
uses: actions/setup-dotnet@v2
- name: Get Run Id
id: get-run-id
shell: bash
env:
WORKFLOW_NAME: Build
run: |
RUN_ID=`gh run --repo ${{ github.repository }} list --workflow ${WORKFLOW_NAME} --json databaseId --jq .[0].databaseId`
echo "Workflow run id: ${RUN_ID}"
echo "run-id=${RUN_ID} >> $GITHUB_OUTPUT"
- uses: actions/download-artifact@v4
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build src\DurangoInteropDotnet.csproj -property:Configuration=Release
run-id: ${{ steps.get-run-id.outputs.run-id }}

- name: List files
run: ls -R .

- name: Package
shell: bash
run: |
cd src/bin/Release/net8.0-windows
7z a -tzip "DurangoInterop_${{github.ref_name}}.zip" "*"
- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: "src/bin/Release/net8.0-windows/DurangoInterop_${{github.ref_name}}.zip"
files: "DurangoInterop_${{github.ref_name}}.zip"
make_latest: true
generate_release_notes: true
fail_on_unmatched_files: true

0 comments on commit bec3ff9

Please sign in to comment.