Skip to content

Commit

Permalink
Publish by architecture, not RID
Browse files Browse the repository at this point in the history
We only publish for Windows
  • Loading branch information
danielchalmers committed Jan 3, 2025
1 parent 08b7bfb commit 18e4414
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 22 deletions.
31 changes: 15 additions & 16 deletions .github/actions/full-build/action.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Prepare for release
name: Full Build

description: Builds, tests, and creates an installer that's ready for release.
description: Builds, tests, and creates binaries that are ready for release.

inputs:
version:
description: 'Version number for the app'
default: '0.0.0'
rids:
description: 'Runtime identifiers for the build'
default: 'win-x64 win-arm64'
archs:
description: 'Architectures for the build'
default: 'x64 arm64'

runs:
using: "composite"
Expand All @@ -23,23 +23,22 @@ runs:
shell: bash
run: dotnet test

- name: Publish
- name: Create Binaries
shell: bash
run: |
for rid in ${{ inputs.rids }}; do
dotnet publish ./TeslaCam/TeslaCam.csproj -o "publish/$rid" -c Release -f net9.0-windows -r $rid --self-contained -p:PublishSingleFile=true -p:Version=${{ inputs.version }}
for arch in ${{ inputs.archs }}; do
dotnet publish ./TeslaCam/TeslaCam.csproj -o "publish/$arch" -c Release -f net9.0-windows --os win --arch $arch --self-contained -p:PublishSingleFile=true -p:Version=${{ inputs.version }}
done
- name: Compress
- name: Create Portable ZIPs
shell: pwsh
run: |
$rids = "${{ inputs.rids }}".Split(" ")
foreach ($rid in $rids) {
Compress-Archive -Path "publish/$rid/*" -DestinationPath "TeslaCamPlayer-${{ inputs.version }}-$rid.zip"
$archs = "${{ inputs.archs }}".Split(" ")
foreach ($arch in $archs) {
Compress-Archive -Path "publish/$arch/*" -DestinationPath "TeslaCamPlayer-${{ inputs.version }}-$arch.zip"
}
- name: Upload artifacts
uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v4
with:
name: portable-artifacts
path: "*.zip"
path: |
publish
8 changes: 2 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ jobs:
uses: ncipollo/release-action@v1
with:
tag: "v${{ github.event.inputs.version }}"
artifacts: "portable.zip"
allowUpdates: true
removeArtifacts: true
replacesArtifacts: true
artifactErrorsFailBuild: true
makeLatest: true
artifacts: "publish/*/*.zip,publish/*/*.msi"
generateReleaseNotes: true
prerelease: ${{ contains(github.event.inputs.version, 'preview') }}

0 comments on commit 18e4414

Please sign in to comment.