Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[485] fix github workflows #518

Merged
merged 66 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
4d7b30d
[485] fix github workflows
philosowaffle Aug 26, 2023
73ed3c0
try fix signing
philosowaffle Aug 26, 2023
d77d74e
change password string
philosowaffle Aug 26, 2023
9e48ad6
lets see what this does
philosowaffle Aug 26, 2023
ec15340
fix location
philosowaffle Aug 26, 2023
583c4b9
try fix path
philosowaffle Aug 26, 2023
5f74364
remove env
philosowaffle Aug 26, 2023
a74059d
can't type
philosowaffle Aug 26, 2023
7df24d1
add bash
philosowaffle Aug 26, 2023
98d3c27
comment out
philosowaffle Aug 26, 2023
2a3fcb9
cmd
philosowaffle Aug 26, 2023
3a1596a
pwsh
philosowaffle Aug 26, 2023
f4f231e
explicit reference
philosowaffle Aug 26, 2023
0f3ea73
whack
philosowaffle Aug 26, 2023
575a8cb
testing
philosowaffle Sep 9, 2023
757d3d0
remove cache
philosowaffle Sep 9, 2023
c6d9b02
version
philosowaffle Sep 9, 2023
6fe81ee
simplify
philosowaffle Sep 9, 2023
d414f32
bash
philosowaffle Sep 9, 2023
4db3d6e
further simplify
philosowaffle Sep 9, 2023
335284c
try pwsh
philosowaffle Sep 9, 2023
c2f3c6b
back to og
philosowaffle Sep 9, 2023
74bd232
try reuse compile steps
philosowaffle Sep 9, 2023
44c8f2f
compile
philosowaffle Sep 9, 2023
83fd0b9
fix upload
philosowaffle Sep 9, 2023
36cdd8e
test docker
philosowaffle Sep 9, 2023
60849db
secrets
philosowaffle Sep 9, 2023
9d19668
ui
philosowaffle Sep 9, 2023
bec3bf8
ui
philosowaffle Sep 9, 2023
f061751
ui
philosowaffle Sep 9, 2023
ccf0f8b
bigger refactor to use shared actions
philosowaffle Sep 9, 2023
0f62181
cmd
philosowaffle Sep 9, 2023
bcb75ca
quick
philosowaffle Sep 9, 2023
3e6a527
cmd
philosowaffle Sep 9, 2023
ef008c9
pwsh
philosowaffle Sep 9, 2023
3da747d
pwsh
philosowaffle Sep 9, 2023
e8fcc4a
pwsh
philosowaffle Sep 9, 2023
5d2468b
back to cmd
philosowaffle Sep 9, 2023
0de604c
polish
philosowaffle Sep 9, 2023
60419eb
Fix upload path
philosowaffle Sep 12, 2023
6cbd717
optimize maui install
philosowaffle Sep 12, 2023
a3db284
update various actions
philosowaffle Sep 12, 2023
e2df855
bump dotnet version to cache bust
philosowaffle Sep 12, 2023
42adbd5
revert
philosowaffle Sep 12, 2023
77d4b5f
cache bust again
philosowaffle Sep 12, 2023
bbec0e9
testing ui artifact
philosowaffle Sep 12, 2023
9f95025
working on msix
philosowaffle Sep 12, 2023
af89678
different dir
philosowaffle Sep 17, 2023
5ddaa7e
ready to run
philosowaffle Sep 17, 2023
b7382dc
finally got published exe to work - back to the good old days
philosowaffle Sep 17, 2023
67c8220
delete extra dirs
philosowaffle Sep 17, 2023
b9680c0
fix first time run errors
philosowaffle Sep 17, 2023
9796a93
copy config file
philosowaffle Sep 17, 2023
297b56b
change copy command
philosowaffle Sep 17, 2023
ab0b5b2
delete publish, and rename
philosowaffle Sep 17, 2023
d9e5928
maui-windows
philosowaffle Sep 18, 2023
755602d
dotnet version
philosowaffle Sep 18, 2023
e1a3528
pin and list workloads
philosowaffle Sep 18, 2023
5033ee7
back to installing all workloads
philosowaffle Sep 18, 2023
4c0ab80
windows and desktop
philosowaffle Sep 18, 2023
766b305
cleanup
philosowaffle Sep 18, 2023
53c9e03
list before install
philosowaffle Sep 24, 2023
bed5092
try not installing the workloads manually
philosowaffle Sep 24, 2023
ae33487
checkin js deps
philosowaffle Sep 24, 2023
304e9de
also remove install from build and test
philosowaffle Sep 24, 2023
672d335
cleanup
philosowaffle Sep 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 49 additions & 0 deletions .github/actions/publish-console-exe-dist/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: 'Publish Windows Console Exe Distribution'
description: 'Publishes the windows console exe'
inputs:
dotnet-version:
description: 'Version of dotnet to install'
required: true
os:
description: 'The OS we are running on'
required: true
outputs:
artifact:
description: 'Path to the published artifact'
value: ${{ github.workspace }}/dist/${{ inputs.os }}
runs:
using: "composite"
steps:
- name: Setup .NET Core SDK ${{ inputs.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ inputs.dotnet-version }}

- name: Clean
run: dotnet clean ${{ github.workspace }}/src/ConsoleClient/ConsoleClient.csproj --configuration Release && dotnet nuget locals all --clear
shell: pwsh

- name: Restore
run: dotnet restore ${{ github.workspace }}/src/ConsoleClient/ConsoleClient.csproj
shell: pwsh

- name: Prepare env
run: |
echo "BUILD_VERSION=$Env:GITHUB_RUN_NUMBER-$Env:GITHUB_RUN_ID" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
echo "RUNNER_TOOL_CACHE=$Env:RUNNER_TOOL_CACHE" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
shell: pwsh

- name: Publish ${{ inputs.os}}
run: dotnet publish ${{ github.workspace }}/src/ConsoleClient/ConsoleClient.csproj --no-restore -c Release -r ${{ inputs.os }} -o ${{ github.workspace }}/dist/${{ inputs.os }} --version-suffix ${{ env.BUILD_VERSION }} --self-contained true
shell: pwsh

- name: Copy Config to Distro
run: cp ${{ github.workspace }}/configuration.example.json ${{ github.workspace }}/dist/${{ inputs.os }}/configuration.local.json
shell: pwsh

# Create Build Artifact
- name: Upload Artifact console_${{ inputs.os }}_${{ env.BUILD_VERSION }}
uses: actions/upload-artifact@v3
with:
name: console_${{ inputs.os }}_${{ env.BUILD_VERSION }}
path: ${{ github.workspace }}/dist/${{ inputs.os }}
94 changes: 94 additions & 0 deletions .github/actions/publish-docker-images/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: 'Publish Docker Images'
description: 'Publishes the Docker Images'
inputs:
dockerfile:
description: 'Dockerfile to build'
required: true
tag:
description: 'The Tag for the Docker image'
required: true
version_tag:
description: 'Specific version tag'
required: false
major_version_tag:
description: 'Major version tag'
required: false
secret_docker_username:
description: "Docker username"
required: true
secret_docker_password:
description: "Docker password"
required: true
secret_github_package:
description: "Github Package Secret"
required: true
runs:
using: "composite"
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ inputs.secret_docker_username }}
password: ${{ inputs.secret_docker_password }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ inputs.secret_github_package }}

- name: Prepare env
run: |
echo "BUILD_VERSION=${GITHUB_RUN_NUMBER}-${GITHUB_RUN_ID}" >> $GITHUB_ENV
shell: bash

- name: Build & Push Tag to Package Repositories
if: inputs.version_tag == ''
id: docker_build_1
uses: docker/build-push-action@v3
with:
push: true
file: ./docker/${{ inputs.dockerfile }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: VERSION=${{ env.BUILD_VERSION }}
tags: |
${{ inputs.secret_docker_username }}/peloton-to-garmin:${{ inputs.tag }}
ghcr.io/${{ github.repository_owner }}/peloton-to-garmin:${{ inputs.tag }}

- name: Image digest
if: inputs.version_tag == ''
run: echo ${{ steps.docker_build_1.outputs.digest }}
shell: bash

- name: Build & Push Version Tags to Package Repositories
if: inputs.version_tag != ''
id: docker_build_2
uses: docker/build-push-action@v3
with:
push: true
file: ./docker/${{ inputs.dockerfile }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: VERSION=${{ env.BUILD_VERSION }}
tags: |
${{ inputs.secret_docker_username }}/peloton-to-garmin:${{ inputs.tag }}
${{ inputs.secret_docker_username }}/peloton-to-garmin:${{ inputs.version_tag }}
${{ inputs.secret_docker_username }}/peloton-to-garmin:${{ inputs.major_version_tag }}
ghcr.io/${{ github.repository_owner }}/peloton-to-garmin:${{ inputs.tag }}
ghcr.io/${{ github.repository_owner }}/peloton-to-garmin:${{ inputs.version_tag }}
ghcr.io/${{ github.repository_owner }}/peloton-to-garmin:${{ inputs.major_version_tag }}

- name: Image digest
if: inputs.version_tag != ''
run: echo ${{ steps.docker_build_2.outputs.digest }}
shell: bash
63 changes: 63 additions & 0 deletions .github/actions/publish-ui-dist/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: 'Publish UI Distribution'
description: 'Publishes the UI Distribution'
inputs:
dotnet-version:
description: 'Version of dotnet to install'
required: true
framework:
description: 'DotNet Framework'
required: true
os:
description: 'The OS we are running on'
required: true
outputs:
artifact:
description: 'Path to the published artifact'
value: ${{ github.workspace }}/dist/${{ inputs.os }}-ui
runs:
using: "composite"
steps:
- name: Setup .NET Core SDK ${{ inputs.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ inputs.dotnet-version }}

- name: List MAUI Workloads
run: dotnet workload list
shell: pwsh

- name: Prepare env
run: |
echo "BUILD_VERSION=$Env:GITHUB_RUN_NUMBER-$Env:GITHUB_RUN_ID" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
echo "RUNNER_TOOL_CACHE=$Env:RUNNER_TOOL_CACHE" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
shell: pwsh

- name: Publish ${{ inputs.os }}
run: dotnet publish ${{ github.workspace }}/src/ClientUI/ClientUI.csproj -c Release -f ${{ inputs.framework }} -p:RuntimeIdentifierOverride=${{ inputs.os }} -p:PublishSingleFile=true -p:SelfContained=true
shell: pwsh

- name: Rename Config
run: Rename-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os }}/configuration.example.json -NewName configuration.local.json
shell: pwsh

- name: Remove nested Publish Dir
run: Remove-Item ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os }}/publish -Recurse
shell: pwsh

# Create Build Artifact
- name: Upload Artifact ui_${{ inputs.os }}_${{ env.BUILD_VERSION }}
uses: actions/upload-artifact@v3
with:
name: ui_${{ inputs.os }}_${{ env.BUILD_VERSION }}
path: ${{ github.workspace }}/src/ClientUI/bin/Release/${{ inputs.framework }}/${{ inputs.os }}


# Installed Workload Id Manifest Version Installation Source
# ---------------------------------------------------------------------
# maui-android 7.0.92/7.0.100 VS 17.7.34031.279
# android 33.0.68/7.0.100 VS 17.7.34031.279
# ios 16.4.7098/7.0.100 VS 17.7.34031.279
# maui-ios 7.0.92/7.0.100 VS 17.7.34031.279
# maui-windows 7.0.92/7.0.100 VS 17.7.34031.279
# maui-maccatalyst 7.0.92/7.0.100 VS 17.7.34031.279
# maccatalyst 16.4.7098/7.0.100 VS 17.7.34031.279
73 changes: 0 additions & 73 deletions .github/workflows/docker_latest.yml

This file was deleted.

Loading
Loading