oh-my-posh/.github/workflows/inno.yml
dependabot[bot] 38e68f9017 chore: bump actions/checkout from 4.1.6 to 4.1.7
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](a5ac7e51b4...692973e3d9)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-13 01:05:19 +00:00

90 lines
3.2 KiB
YAML

name: Inno
on:
release:
types: [published]
jobs:
publish:
runs-on: windows-latest
strategy:
matrix:
arch: [amd64, arm64, 386]
defaults:
run:
shell: pwsh
working-directory: ${{ github.workspace }}/packages/inno
steps:
- name: Checkout code 👋
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Build installer 📦
id: build
env:
CERTIFICATE: ${{ secrets.CERTIFICATE }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
run: |
$version = $env:GITHUB_REF.TrimStart("refs/tags/v")
./build.ps1 -Architecture ${{ matrix.arch }} -Version $version
- name: Upload artifacts 🆙
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
console.log('environment', process.versions);
const fs = require('fs').promises;
const { repo: { owner, repo }, sha } = context;
console.log({ owner, repo, sha });
for (let file of await fs.readdir('./packages/inno/Output')) {
console.log('uploading', file);
await github.rest.repos.uploadReleaseAsset({
owner, repo,
release_id: ${{ github.event.release.id }},
name: file,
data: await fs.readFile(`./packages/inno/Output/${file}`)
});
}
notify:
runs-on: ubuntu-latest
needs: publish
steps:
- name: Notify Winget Build 🙋🏾‍♀️
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
github-token: ${{ secrets.GH_PAT }}
script: |
await github.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', {
owner: 'jandedobbeleer',
repo: '${{ github.event.repository.name }}',
workflow_id: 'winget.yml',
ref: 'main',
inputs: {"version": process.env.GITHUB_REF.replace('refs/tags/v', '')}
})
- name: Notify Windows Store Build 👋
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
github-token: ${{ secrets.GH_PAT }}
script: |
await github.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', {
owner: 'jandedobbeleer',
repo: '${{ github.event.repository.name }}',
workflow_id: 'microsoft_store.yml',
ref: 'main',
inputs: {"version": process.env.GITHUB_REF.replace('refs/tags/v', '')}
})
- name: Notify Scoop Build 🤙
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
with:
github-token: ${{ secrets.GH_PAT }}
script: |
await github.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', {
owner: 'jandedobbeleer',
repo: '${{ github.event.repository.name }}',
workflow_id: 'scoop.yml',
ref: 'main',
inputs: {"version": process.env.GITHUB_REF.replace('refs/tags/v', ''), "release": "${{ github.event.release.id }}" }
})