forked from sachabruttin/CosmosDbExplorer
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.47 KB
/
inno.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Inno
on:
workflow_dispatch:
inputs:
tag:
description: 'Git Tag'
required: true
# release:
# types: [published]
jobs:
publish:
runs-on: windows-latest
defaults:
run:
shell: pwsh
working-directory: ${{ github.workspace }}/setup/inno
steps:
- name: Checkout code 👋
uses: actions/checkout@v2
- name: Get release ⬇️
id: get_release
uses: cardinalby/git-get-release-action@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag: ${{ github.event.inputs.tag }}
- name: Build installer 📦
id: build
run: |
$version = '${{ steps.get_release.outputs.name }}'
./build.ps1 -Version $version
- name: Upload artifacts 🆙
uses: actions/github-script@v5
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('./setup/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(`./setup/inno/Output/${file}`)
});
}