mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2026-08-24 10:14:12 -05:00
Bumps the all group with 1 update: [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action). Updates `goreleaser/goreleaser-action` from 7.0.0 to 7.1.0 - [Release notes](https://github.com/goreleaser/goreleaser-action/releases) - [Commits](https://github.com/goreleaser/goreleaser-action/compare/ec59f474b9834571250b370d4735c50f8e2d1e29...e24998b8b67b290c2fa8b7c14fcfa7de2c5c9b8c) --- updated-dependencies: - dependency-name: goreleaser/goreleaser-action dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com>
180 lines
6.4 KiB
YAML
180 lines
6.4 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "src/**"
|
|
- "packages/**"
|
|
- ".github/workflows/**"
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}
|
|
|
|
jobs:
|
|
changelog:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
version: ${{ steps.changelog.outputs.version }}
|
|
body: ${{ steps.changelog.outputs.clean_changelog }}
|
|
tag: ${{ steps.changelog.outputs.tag }}
|
|
skipped: ${{ steps.changelog.outputs.skipped }}
|
|
steps:
|
|
- name: Checkout code 👋
|
|
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
|
|
- name: Create changelog ✍️
|
|
id: changelog
|
|
uses: TriPSs/conventional-changelog-action@91be4f3188da74fe85de9caffcebc80b26d43b5b
|
|
with:
|
|
github-token: ${{ secrets.github_token }}
|
|
skip-version-file: "true"
|
|
output-file: "false"
|
|
skip-commit: "true"
|
|
skip-on-empty: "true"
|
|
skip-tag: "true"
|
|
|
|
artifacts:
|
|
needs: changelog
|
|
if: ${{ needs.changelog.outputs.skipped == 'false' }}
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
shell: pwsh
|
|
working-directory: ${{ github.workspace }}/build
|
|
steps:
|
|
- name: Checkout code 👋
|
|
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
|
|
- name: Install Go 🗳
|
|
uses: ./.github/workflows/composite/bootstrap-go
|
|
- name: Pre Build 😸
|
|
env:
|
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
|
run: |
|
|
./pre.ps1 -Version ${{ needs.changelog.outputs.version }} -SDKVersion "10.0.26100.0"
|
|
- name: Run GoReleaser 🚀
|
|
uses: goreleaser/goreleaser-action@e24998b8b67b290c2fa8b7c14fcfa7de2c5c9b8c
|
|
with:
|
|
distribution: goreleaser
|
|
version: v2.3.2
|
|
args: release --clean --skip publish
|
|
workdir: src
|
|
env:
|
|
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
|
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
|
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
|
- name: Post Build 🤐
|
|
run: |
|
|
./post.ps1
|
|
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
|
|
with:
|
|
name: build-artifacts
|
|
path: |
|
|
src/dist/posh-*
|
|
src/dist/themes.*
|
|
src/dist/checksums.*
|
|
msi:
|
|
needs:
|
|
- changelog
|
|
- artifacts
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
arch: [x64, arm64]
|
|
defaults:
|
|
run:
|
|
shell: pwsh
|
|
working-directory: ${{ github.workspace }}/packages/msi
|
|
steps:
|
|
- name: Checkout code 👋
|
|
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
|
|
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
|
|
with:
|
|
name: build-artifacts
|
|
path: dist
|
|
- name: Install Wix Toolset 🛠
|
|
run: dotnet tool install --global wix
|
|
- name: Build installer 📦
|
|
id: build
|
|
env:
|
|
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
|
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
|
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
|
run: |
|
|
$version = '${{ needs.changelog.outputs.version }}'.TrimStart("v")
|
|
./build.ps1 -Architecture ${{ matrix.arch }} -Version $version -Copy -Sign -SDKVersion "10.0.26100.0"
|
|
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
|
|
with:
|
|
name: msi-artifact-${{ matrix.arch }}
|
|
path: |
|
|
packages/msi/out/install-${{ matrix.arch }}.msi
|
|
packages/msi/out/install-${{ matrix.arch }}.msix
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- changelog
|
|
- artifacts
|
|
- msi
|
|
steps:
|
|
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
|
|
with:
|
|
merge-multiple: true
|
|
- name: Upload version file
|
|
env:
|
|
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.CDN_CONNECTIONSTRING }}
|
|
run: |
|
|
echo v${{ needs.changelog.outputs.version }} > version.txt
|
|
az storage blob upload-batch --destination releases/v${{ needs.changelog.outputs.version }} --source .
|
|
az storage blob upload-batch --destination releases/latest --overwrite true --source .
|
|
- name: Release 🎓
|
|
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda
|
|
with:
|
|
tag_name: ${{ needs.changelog.outputs.tag }}
|
|
body: ${{ needs.changelog.outputs.body }}
|
|
fail_on_unmatched_files: true
|
|
token: ${{ secrets.GH_PAT }}
|
|
files: |
|
|
*
|
|
winget:
|
|
runs-on: windows-latest
|
|
needs:
|
|
- changelog
|
|
- release
|
|
env:
|
|
WINGETCREATE_TOKEN: ${{ secrets.WINGETCREATE_TOKEN }}
|
|
steps:
|
|
- name: Create manifest and submit PR 📦
|
|
shell: pwsh
|
|
run: |
|
|
Write-Host "Preparing to submit to WinGet repository..." -ForegroundColor Green
|
|
|
|
# Install the latest wingetcreate exe
|
|
# Need to do things this way, see https://github.com/PowerShell/PowerShell/issues/13138
|
|
Write-Verbose "Importing Appx module using Windows PowerShell compatibility"
|
|
Import-Module Appx -UseWindowsPowerShell -ErrorAction Stop
|
|
|
|
# Download and install Winget-Create msixbundle
|
|
$appxBundleFile = Join-Path -Path $env:TEMP -ChildPath "wingetcreate.msixbundle"
|
|
Write-Verbose "Downloading wingetcreate to: $appxBundleFile"
|
|
|
|
Invoke-WebRequest -Uri "https://aka.ms/wingetcreate/latest/msixbundle" -OutFile $appxBundleFile -ErrorAction Stop
|
|
Add-AppxPackage -Path $appxBundleFile -ErrorAction Stop
|
|
|
|
Write-Verbose "Successfully installed wingetcreate"
|
|
|
|
# Submit the PR to WinGet repository
|
|
Write-Host "Submitting pull request to WinGet repository..." -ForegroundColor Green
|
|
|
|
$version = "${{ needs.changelog.outputs.tag }}"
|
|
$version = $version.TrimStart('v')
|
|
|
|
$urls = @(
|
|
"https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$version/install-x64.msi|x64",
|
|
"https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$version/install-x64.msix|x64",
|
|
"https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$version/install-arm64.msi|arm64",
|
|
"https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v$version/install-arm64.msix|arm64"
|
|
)
|
|
|
|
wingetcreate update JanDeDobbeleer.OhMyPosh --version $version --token $env:WINGETCREATE_TOKEN --submit --urls $urls
|