2021-10-06 12:43:18 -07:00
|
|
|
name: Scoop
|
|
|
|
on:
|
2022-10-19 03:49:26 -07:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
description: 'The latest version'
|
|
|
|
required: true
|
2022-10-19 11:08:00 -07:00
|
|
|
release:
|
|
|
|
description: 'The release id'
|
|
|
|
required: true
|
2021-10-06 12:43:18 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: pwsh
|
|
|
|
working-directory: ${{ github.workspace }}/packages/scoop
|
|
|
|
steps:
|
|
|
|
- name: Checkout code 👋
|
2023-01-05 16:26:15 -08:00
|
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
|
2021-10-06 12:43:18 -07:00
|
|
|
- name: Update Template ✍️
|
|
|
|
run: |
|
2022-10-19 11:08:00 -07:00
|
|
|
./build.ps1 -Version ${{ github.event.inputs.version }}
|
2021-10-06 12:43:18 -07:00
|
|
|
- name: Upload artifacts 🆙
|
2022-10-13 17:52:51 -07:00
|
|
|
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
|
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 });
|
|
|
|
|
2022-10-19 03:49:26 -07:00
|
|
|
await github.rest.repos.uploadReleaseAsset({
|
|
|
|
owner, repo,
|
2022-10-19 11:08:00 -07:00
|
|
|
release_id: ${{ github.event.inputs.release }},
|
|
|
|
name: 'oh-my-posh.json',
|
2022-10-19 03:49:26 -07:00
|
|
|
data: await fs.readFile('./packages/scoop/dist/oh-my-posh.json')
|
|
|
|
});
|