oh-my-posh/.github/workflows/scoop.yml
dependabot[bot] cc2ea390ee chore(deps): bump actions/checkout from 3.5.1 to 3.5.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](83b7061638...8e5e7e5ab8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-14 06:47:58 +02:00

43 lines
1.2 KiB
YAML

name: Scoop
on:
workflow_dispatch:
inputs:
version:
description: 'The latest version'
required: true
release:
description: 'The release id'
required: true
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
shell: pwsh
working-directory: ${{ github.workspace }}/packages/scoop
steps:
- name: Checkout code 👋
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Update Template ✍️
run: |
./build.ps1 -Version ${{ github.event.inputs.version }}
- name: Upload artifacts 🆙
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
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,
release_id: ${{ github.event.inputs.release }},
name: 'oh-my-posh.json',
data: await fs.readFile('./packages/scoop/dist/oh-my-posh.json')
});