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

Release workflow #146

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ jobs:

# Build SDK
- name: Build SDK
run: pwsh -File Utils/Build-RscSdk.ps1 -NoTests -CI
run: pwsh -NoProfile -NonInteractive -File Utils/Build-RscSdk.ps1 -NoTests -CI

# Test SDK
- name: Test SDK
env:
RSC_SERVICE_ACCOUNT_FILE: ${{ github.workspace }}/service_account.json
run: pwsh -File Utils/Test-RscSdk.ps1 -CI
run: pwsh -NoProfile -NonInteractive -File Utils/Test-RscSdk.ps1 -CI
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release SDK

on:
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

# Ensure PowerShell config directory exists
- name: Ensure PowerShell config directory exists
run: mkdir -p /home/runner/.config/powershell
shell: bash

# Create the service account file from the secret
- name: Create Service Account File
run: |
echo '${{ secrets.RSC_SERVICE_ACCOUNT_JSON }}' > ${{ github.workspace }}/service_account.json
shell: bash

# Install PowerShell
- name: Install PowerShell
run: |
# Update the list of products
sudo apt-get update
# Install a basic PowerShell environment
sudo apt-get install -y powershell

# Setup .NET
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

# Check what is currently the latest release
- name: Check Published Release
run: pwsh -NoProfile -NonInteractive -File Utils/admin/Test-RscSdkRelease.ps1

# Check if the current branch is correctly put together
- name: Check Release candidate
run: pwsh -NoProfile -NonInteractive -File Utils/admin/Test-RscSdkCandidate.ps1

# Dry run the release
- name: Dry run release
env:
RSC_SERVICE_ACCOUNT_FILE: ${{ github.workspace }}/service_account.json
run: pwsh -NoProfile -NonInteractive -File Utils/admin/New-RscSdkRelease.ps1

# Release
- name: Release
env:
RSC_SERVICE_ACCOUNT_FILE: ${{ github.workspace }}/service_account.json
run: pwsh -NoProfile -NonInteractive -File Utils/admin/New-RscSdkRelease.ps1 -NotDry
Loading