Add a finalizer, which currently doesn't do anything. #85
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
name: Alethic.Auth0.Operator | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET 8.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Setup .NET 9.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.0.x | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v3 | |
with: | |
versionSpec: 5.x | |
- name: Execute GitVersion | |
uses: gittools/actions/gitversion/execute@v3 | |
with: | |
useConfigFile: true | |
configFilePath: GitVersion.yml | |
- name: Add NuGet Source (GitHub) | |
shell: pwsh | |
run: dotnet nuget add source --username USERNAME --password $env:GITHUB_TOKEN --store-password-in-clear-text --name alethic $env:GITHUB_REPOS | |
env: | |
GITHUB_REPOS: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: NuGet Restore | |
run: dotnet restore Alethic.Auth0.Operator.sln | |
- name: Build | |
run: | | |
dotnet msbuild /m /bl \ | |
/p:Configuration="Release" \ | |
/p:Platform="Any CPU" \ | |
/p:Version=${GitVersion_FullSemVer} \ | |
/p:AssemblyVersion=${GitVersion_AssemblySemVer} \ | |
/p:InformationalVersion=${GitVersion_InformationalVersion} \ | |
/p:FileVersion=${GitVersion_AssemblySemFileVer} \ | |
/p:PackageVersion=${GitVersion_FullSemVer} \ | |
/p:RepositoryUrl="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" \ | |
/p:PackageProjectUrl="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" \ | |
/p:BuildInParallel=true \ | |
/p:CreateHardLinksForAdditionalFilesIfPossible=true \ | |
/p:CreateHardLinksForCopyAdditionalFilesIfPossible=true \ | |
/p:CreateHardLinksForCopyFilesToOutputDirectoryIfPossible=true \ | |
/p:CreateHardLinksForCopyLocalIfPossible=true \ | |
/p:CreateHardLinksForPublishFilesIfPossible=true \ | |
/p:ContinuousIntegrationBuild=true \ | |
Alethic.Auth0.Operator.dist.msbuildproj | |
- name: Upload MSBuild Log | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: msbuild.binlog | |
path: msbuild.binlog | |
- name: Package Containers | |
run: tar czvf /tmp/containers.tar.gz containers | |
working-directory: dist | |
- name: Upload Containers | |
uses: actions/upload-artifact@v4 | |
with: | |
name: containers | |
path: /tmp/containers.tar.gz | |
- name: Package Charts | |
run: tar czvf /tmp/charts.tar.gz charts | |
working-directory: dist | |
- name: Upload Charts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: charts | |
path: /tmp/charts.tar.gz | |
- name: Package Tests | |
run: tar czvf /tmp/tests.tar.gz tests | |
working-directory: dist | |
- name: Upload Tests | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tests | |
path: /tmp/tests.tar.gz | |
release: | |
name: Release | |
if: github.event_name != 'pull_request' | |
needs: | |
- build | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET 9.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9.0.x | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v3 | |
with: | |
versionSpec: 5.x | |
- name: Execute GitVersion | |
id: GitVersion | |
uses: gittools/actions/gitversion/execute@v3 | |
with: | |
useConfigFile: true | |
- name: Download Containers | |
uses: actions/download-artifact@v4 | |
with: | |
name: containers | |
path: dist | |
- name: Restore Containers | |
run: tar xzvf containers.tar.gz | |
working-directory: dist | |
- name: Download Charts | |
uses: actions/download-artifact@v4 | |
with: | |
name: charts | |
path: dist | |
- name: Restore Charts | |
run: tar xzvf charts.tar.gz | |
working-directory: dist | |
- name: Create Release | |
if: github.ref_type == 'tag' | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ steps.GitVersion.outputs.semVer }} | |
allowUpdates: true | |
omitBodyDuringUpdate: true | |
artifacts: dist/containers/*.tar,dist/charts/*.tgz | |
makeLatest: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login To Repository (GitHub) | |
uses: redhat-actions/podman-login@v1 | |
with: | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
registry: ghcr.io/${{ github.repository_owner }} | |
- name: Push Containers (GitHub) | |
if: github.event_name != 'pull_request' | |
uses: docker://quay.io/skopeo/stable:latest | |
with: | |
args: copy "--dest-creds=${{ github.actor }}:${{ github.token }}" docker-archive:/github/workspace/dist/containers/auth0-operator-image.tar docker://ghcr.io/${{ github.repository_owner }}/auth0-operator-image:${{ steps.GitVersion.outputs.semVer }} | |
- name: Push Charts (GitHub) | |
if: github.event_name != 'pull_request' | |
run: helm push dist/charts/*.tgz oci://ghcr.io/${{ github.repository_owner }} | |