oh-my-posh/.github/workflows/scoop.yml

43 lines
1.2 KiB
YAML
Raw Normal View History

2021-10-06 12:43:18 -07:00
name: Scoop
on:
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 👋
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
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 🆙
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
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 });
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',
data: await fs.readFile('./packages/scoop/dist/oh-my-posh.json')
});