mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-15 23:44:03 -08:00
f94b607106
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](7ec5c2b0c6...5742e2a039
)
---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
97 lines
3.2 KiB
YAML
97 lines
3.2 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@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
|
- name: Create changelog ✍️
|
|
id: changelog
|
|
uses: TriPSs/conventional-changelog-action@f04dac1fd07687cec8ea302937ca588b33786e98
|
|
with:
|
|
github-token: ${{ secrets.github_token }}
|
|
skip-version-file: "true"
|
|
output-file: "false"
|
|
skip-commit: "true"
|
|
skip-on-empty: "true"
|
|
artifacts:
|
|
needs: changelog
|
|
if: ${{ needs.changelog.outputs.skipped == 'false' }}
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
COSIGN_KEY_LOCATION: "/tmp/cosign.key"
|
|
defaults:
|
|
run:
|
|
shell: pwsh
|
|
working-directory: ${{ github.workspace }}/src
|
|
steps:
|
|
- name: Checkout code 👋
|
|
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
|
|
- name: Install Go 🗳
|
|
uses: ./.github/workflows/composite/bootstrap-go
|
|
- name: Tag HEAD 😸
|
|
run: |
|
|
git config --global user.name "GitHub Actions"
|
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git tag ${{ needs.changelog.outputs.tag }}
|
|
- name: Install cosign 🔑
|
|
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20
|
|
with:
|
|
cosign-release: 'v1.4.0'
|
|
- name: Private Key 🔐
|
|
run: |
|
|
$PSDefaultParameterValues['Out-File:Encoding']='UTF8'
|
|
$env:COSIGN_KEY > $env:COSIGN_KEY_LOCATION
|
|
env:
|
|
COSIGN_KEY: ${{secrets.COSIGN_KEY}}
|
|
- name: Run GoReleaser 🚀
|
|
uses: goreleaser/goreleaser-action@5742e2a039330cbb23ebf35f046f814d4c6ff811
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: build --clean
|
|
workdir: src
|
|
env:
|
|
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
|
|
- name: Zip theme files 🤐
|
|
run: |
|
|
$compress = @{
|
|
Path = "../themes/*.omp.*"
|
|
CompressionLevel = "Fastest"
|
|
DestinationPath = "./dist/themes.zip"
|
|
}
|
|
Compress-Archive @compress
|
|
- name: Add hashes 🤫
|
|
run: |
|
|
Get-ChildItem ./dist -Exclude *.yaml,*.sig | Get-Unique |
|
|
Foreach-Object {
|
|
$zipHash = Get-FileHash $_.FullName -Algorithm SHA256
|
|
$zipHash.Hash | Out-File -Encoding 'UTF8' "./dist/$($_.Name).sha256"
|
|
}
|
|
shell: pwsh
|
|
- name: Release 🎓
|
|
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87
|
|
with:
|
|
tag_name: ${{ needs.changelog.outputs.tag }}
|
|
body: ${{ needs.changelog.outputs.body }}
|
|
fail_on_unmatched_files: true
|
|
token: ${{ secrets.GH_PAT }}
|
|
files: |
|
|
src/dist/posh-*
|
|
src/dist/themes.*
|