2021-10-06 12:43:18 -07:00
|
|
|
name: Inno
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-01-19 01:36:31 -08:00
|
|
|
arch: [amd64, arm64, 386]
|
2021-10-06 12:43:18 -07:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: pwsh
|
|
|
|
working-directory: ${{ github.workspace }}/packages/inno
|
|
|
|
steps:
|
|
|
|
- name: Checkout code 👋
|
2024-06-12 17:59:55 -07:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
2021-10-06 12:43:18 -07:00
|
|
|
- name: Build installer 📦
|
|
|
|
id: build
|
2022-06-19 11:00:31 -07:00
|
|
|
env:
|
|
|
|
CERTIFICATE: ${{ secrets.CERTIFICATE }}
|
|
|
|
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
|
2021-10-06 12:43:18 -07:00
|
|
|
run: |
|
|
|
|
$version = $env:GITHUB_REF.TrimStart("refs/tags/v")
|
|
|
|
./build.ps1 -Architecture ${{ matrix.arch }} -Version $version
|
|
|
|
- name: Upload artifacts 🆙
|
2023-11-19 16:14:52 -08:00
|
|
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
|
2021-10-06 12:43:18 -07:00
|
|
|
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,
|
2022-10-19 11:08:00 -07:00
|
|
|
release_id: ${{ github.event.release.id }},
|
2021-10-06 12:43:18 -07:00
|
|
|
name: file,
|
|
|
|
data: await fs.readFile(`./packages/inno/Output/${file}`)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
notify:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: publish
|
|
|
|
steps:
|
|
|
|
- name: Notify Winget Build 🙋🏾♀️
|
2023-11-19 16:14:52 -08:00
|
|
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
|
2021-10-06 12:43:18 -07:00
|
|
|
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', '')}
|
|
|
|
})
|
2022-05-28 15:47:10 -07:00
|
|
|
- name: Notify Windows Store Build 👋
|
2023-11-19 16:14:52 -08:00
|
|
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
|
2022-05-27 12:14:41 -07:00
|
|
|
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', '')}
|
|
|
|
})
|
2022-10-19 03:49:26 -07:00
|
|
|
- name: Notify Scoop Build 🤙
|
2023-11-19 16:14:52 -08:00
|
|
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
|
2022-10-19 03:49:26 -07:00
|
|
|
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',
|
2022-10-19 11:08:00 -07:00
|
|
|
inputs: {"version": process.env.GITHUB_REF.replace('refs/tags/v', ''), "release": "${{ github.event.release.id }}" }
|
2022-10-19 03:49:26 -07:00
|
|
|
})
|
2021-10-06 12:43:18 -07:00
|
|
|
|