mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-21 02:55:37 -08:00
fix(scoop): correct build logic
This commit is contained in:
parent
30f44f46d2
commit
080558c7df
9
.github/workflows/inno.yml
vendored
9
.github/workflows/inno.yml
vendored
|
@ -24,11 +24,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
$version = $env:GITHUB_REF.TrimStart("refs/tags/v")
|
$version = $env:GITHUB_REF.TrimStart("refs/tags/v")
|
||||||
./build.ps1 -Architecture ${{ matrix.arch }} -Version $version
|
./build.ps1 -Architecture ${{ matrix.arch }} -Version $version
|
||||||
- name: Get release ⬇️
|
|
||||||
id: get_release
|
|
||||||
uses: bruceadams/get-release@v1.2.3
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
- name: Upload artifacts 🆙
|
- name: Upload artifacts 🆙
|
||||||
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
|
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
|
||||||
with:
|
with:
|
||||||
|
@ -46,7 +41,7 @@ jobs:
|
||||||
|
|
||||||
await github.rest.repos.uploadReleaseAsset({
|
await github.rest.repos.uploadReleaseAsset({
|
||||||
owner, repo,
|
owner, repo,
|
||||||
release_id: ${{ steps.get_release.outputs.id }},
|
release_id: ${{ github.event.release.id }},
|
||||||
name: file,
|
name: file,
|
||||||
data: await fs.readFile(`./packages/inno/Output/${file}`)
|
data: await fs.readFile(`./packages/inno/Output/${file}`)
|
||||||
});
|
});
|
||||||
|
@ -89,6 +84,6 @@ jobs:
|
||||||
repo: '${{ github.event.repository.name }}',
|
repo: '${{ github.event.repository.name }}',
|
||||||
workflow_id: 'scoop.yml',
|
workflow_id: 'scoop.yml',
|
||||||
ref: 'main',
|
ref: 'main',
|
||||||
inputs: {"version": process.env.GITHUB_REF.replace('refs/tags/v', '')}
|
inputs: {"version": process.env.GITHUB_REF.replace('refs/tags/v', ''), "release": "${{ github.event.release.id }}" }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
15
.github/workflows/scoop.yml
vendored
15
.github/workflows/scoop.yml
vendored
|
@ -5,6 +5,9 @@ on:
|
||||||
version:
|
version:
|
||||||
description: 'The latest version'
|
description: 'The latest version'
|
||||||
required: true
|
required: true
|
||||||
|
release:
|
||||||
|
description: 'The release id'
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
|
@ -16,15 +19,9 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code 👋
|
- name: Checkout code 👋
|
||||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
|
||||||
- name: Get release ⬇️
|
|
||||||
id: get_release
|
|
||||||
uses: bruceadams/get-release@3a8733307b85cd96d52772b037617bd63d99522e
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
|
||||||
- name: Update Template ✍️
|
- name: Update Template ✍️
|
||||||
run: |
|
run: |
|
||||||
$version = $env:GITHUB_REF.TrimStart("refs/tags/v")
|
./build.ps1 -Version ${{ github.event.inputs.version }}
|
||||||
./build.ps1 -Version $version
|
|
||||||
- name: Upload artifacts 🆙
|
- name: Upload artifacts 🆙
|
||||||
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
|
uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
|
||||||
with:
|
with:
|
||||||
|
@ -39,7 +36,7 @@ jobs:
|
||||||
|
|
||||||
await github.rest.repos.uploadReleaseAsset({
|
await github.rest.repos.uploadReleaseAsset({
|
||||||
owner, repo,
|
owner, repo,
|
||||||
release_id: ${{ steps.get_release.outputs.id }},
|
release_id: ${{ github.event.inputs.release }},
|
||||||
name: "oh-my-posh.json",
|
name: 'oh-my-posh.json',
|
||||||
data: await fs.readFile('./packages/scoop/dist/oh-my-posh.json')
|
data: await fs.readFile('./packages/scoop/dist/oh-my-posh.json')
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue