mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-14 06:54:05 -08:00
c5db00455e
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](755da8c3cf...ac59398561
)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
94 lines
3 KiB
YAML
94 lines
3 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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
- name: Create changelog ✍️
|
|
id: changelog
|
|
uses: TriPSs/conventional-changelog-action@858fe562a4d01987825f5e96b2a541f53b22c8b6
|
|
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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
|
- name: Install Go 🗳
|
|
uses: ./.github/workflows/composite/bootstrap-go
|
|
- name: Tag HEAD 😸
|
|
run: git tag ${{ needs.changelog.outputs.tag }}
|
|
- name: Install cosign 🔑
|
|
uses: sigstore/cosign-installer@9becc617647dfa20ae7b1151972e9b3a2c338a2b
|
|
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@8f67e590f2d095516493f017008adc464e63adb1
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: build --rm-dist
|
|
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@de2c0eb89ae2a093876385947365aca7b0e5f844
|
|
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.*
|