oh-my-posh/.github/workflows/release.yml
dependabot[bot] 72d3bf35dd
Some checks are pending
Code QL / code-ql (push) Waiting to run
Release / changelog (push) Waiting to run
Release / artifacts (push) Blocked by required conditions
Release / msi (arm64) (push) Blocked by required conditions
Release / msi (x64) (push) Blocked by required conditions
Release / msi (x86) (push) Blocked by required conditions
Release / release (push) Blocked by required conditions
chore: bump softprops/action-gh-release from 2.1.0 to 2.2.0
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](01570a1f39...7b4da11513)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-12 01:00:58 +00:00

135 lines
4.4 KiB
YAML

name: Release
on:
push:
branches:
- main
paths:
- "src/**"
- "packages/**"
- ".github/workflows/**"
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@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Create changelog ✍️
id: changelog
uses: TriPSs/conventional-changelog-action@67139193614f5b9e8db87da1bd4240922b34d765
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@11bd71901bbe5b1630ceea73d27597364c9af683
- 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 }}
- name: Run GoReleaser 🚀
uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf
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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
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, x86]
defaults:
run:
shell: pwsh
working-directory: ${{ github.workspace }}/packages/msi
steps:
- name: Checkout code 👋
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
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
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: msi-artifact-${{ matrix.arch }}
path: |
packages/msi/out/install-${{ matrix.arch }}.msi
packages/msi/out/install-${{ matrix.arch }}.msi.sha256
release:
runs-on: ubuntu-latest
needs:
- changelog
- artifacts
- msi
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
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 v${{ needs.changelog.outputs.version }} --source .
az storage blob upload-batch --destination latest --overwrite true --source .
- name: Release 🎓
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048
with:
tag_name: ${{ needs.changelog.outputs.tag }}
body: ${{ needs.changelog.outputs.body }}
fail_on_unmatched_files: true
token: ${{ secrets.GH_PAT }}
files: |
*