Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gaviny82 committed Mar 2, 2024
1 parent ef8e42f commit 4743276
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 27 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,9 @@ jobs:
# if: steps.cache.outputs.cache-hit != 'true'
run: dotnet nuget add source "https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json"

# - name: Init SubModules
# run: git submodule update --init --recursive

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore NuGet packages
# must run
run: dotnet restore # msbuild $env:Solution_Name /t:Restore /p:Configuration=Release
run: dotnet restore

# Prepare FluentLauncher.Localization
- name: Prepare FluentLauncher.Localization
Expand Down Expand Up @@ -106,7 +102,7 @@ jobs:
# Move .msix for upload to artifacts
mv ${{ env.Packages_Directory }}\*\*.msix "$packageName.msix"
# Decode the base 64 encoded pfx and sign the package
# Decode the base64 encoded pfx and sign the package
- name: Sign .msix
run: |
# Get signtool.exe
Expand Down
37 changes: 17 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ on:
workflow_dispatch:
inputs:
flag:
description: "Publish?"
description: "Publish to Microsoft Store"
required: true
default: false
type: boolean
tag1:
description: "Pre/Release?"
description: "Is beta?"
required: true
default: "beta"
default: "v"
type: choice
options:
- beta
- v
tag2:
description: "Version?(e.g 2.0.0.6)"
description: "Version (e.g 2.0.0.6):"
required: true
type: string

Expand All @@ -28,19 +28,16 @@ jobs:
uses: ./.github/workflows/build.yml

release:
name: Release
name: Create .msixbundle
needs: build
runs-on: windows-latest
env:
SigningKey_Path: SigningKey.pfx
Artifacts_Path: .artifacts

steps:
- name: CheckOut
uses: actions/checkout@v3

- name: Download .msix from artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: .msix
path: ${{ env.Artifacts_Path }}
Expand Down Expand Up @@ -88,28 +85,28 @@ jobs:
rm "${{ env.SigningKey_Path }}"
- name: Upload .msixbundle to artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: .msixbundle
path: ${{ steps.get_package_info.outputs.bundleFileName }}

Create-Tag:
runs-on: ubuntu-latest
name: Create-Tag
needs: [build]
name: Create tag
needs: build
if: ${{inputs.flag}}
outputs:
tag: "refs/tags/${{inputs.tag1}}${{inputs.tag2}}"
steps:
- name: CheckOut
uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4

- name: config Git
- name: Config git user
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub-actions[bot]"
- name: Create Tag
- name: Create tag
run: |
git tag -a ${{inputs.tag1}}${{inputs.tag2}} -m "${{inputs.tag1}}${{inputs.tag2}}"
git push origin ${{inputs.tag1}}${{inputs.tag2}}
Expand All @@ -122,10 +119,10 @@ jobs:
env:
Artifacts_Path: .artifacts
steps:
- name: CheckOut
- name: Checkout code
uses: actions/checkout@v3

- name: CheckTag
- name: Check tag
id: CheckTag
run: |
if [ "${{inputs.flag}}" ]; then
Expand All @@ -137,7 +134,7 @@ jobs:
fi
- name: Download .msixupload from artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: .msixupload
path: "${{ github.workspace }}/${{env.Artifacts_Path}}"
Expand All @@ -161,7 +158,7 @@ jobs:

- name: Download .msixbundle from artifacts
if: ${{ !contains(needs.Create-Tag.outputs.tag,'v') }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: .msixbundle
path: "${{ github.workspace }}/${{env.Artifacts_Path}}"
Expand Down
2 changes: 1 addition & 1 deletion update-localization.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if ($latestStringsDate -ge $latestViewsDate) {

# Change directory and call build.bat
Set-Location .\FluentLauncher.Localization
echo `n | & ".\build.bat"
Write-Output `n | & ".\build.bat"

# Copy resw files generated to the FluentLauncher project
$source = Join-Path (Get-Location) "Strings"
Expand Down

0 comments on commit 4743276

Please sign in to comment.