mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-18 00:44:05 -08:00
c68bb002ad
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.1 to 6.3.2.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](7dff1a8764...100527700e
)
---
updated-dependencies:
- dependency-name: actions/github-script
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
83 lines
2.8 KiB
YAML
83 lines
2.8 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@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
|
|
- 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: Get release ⬇️
|
|
id: get_release
|
|
uses: bruceadams/get-release@v1.2.3
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
- name: Upload artifacts 🆙
|
|
uses: actions/github-script@100527700e8b29ca817ac0e0dfbfc5e8ff38edda
|
|
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: ${{ steps.get_release.outputs.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@100527700e8b29ca817ac0e0dfbfc5e8ff38edda
|
|
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@100527700e8b29ca817ac0e0dfbfc5e8ff38edda
|
|
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', '')}
|
|
})
|
|
|