-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,12 @@ name: Package | |
|
||
on: | ||
workflow_call: | ||
inputs: | ||
nightly: | ||
type: boolean | ||
default: false | ||
required: false | ||
description: 'Whether to publish a nightly build' | ||
|
||
jobs: | ||
package: | ||
|
@@ -21,6 +27,34 @@ jobs: | |
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Replace name in package.json | ||
run: jq '.name = "biome"' package.json > package.json | ||
|
||
- name: Replace displayName in package.json | ||
run: jq '.displayName = "Biome"' package.json > package.json | ||
|
||
- name: Retrieve version from package.json | ||
id: packageJsonVersion | ||
run: echo "version=$(jq -r '.version' package.json)" | ||
|
||
- name: Parse version | ||
id: version | ||
uses: [email protected] | ||
with: | ||
version: ${{ steps.packageJsonVersion.outputs.version }} | ||
|
||
- name: Get date | ||
if: ${{ github.event.inputs.nightly }} | ||
id: date | ||
run: echo "date=$(date +'%Y%m%d')" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Build version string | ||
id: version-string | ||
run: echo "version=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ github.event.inputs.nightly && steps.date.outputs.date || steps.version.outputs.patch }}" >> $GITHUB_OUPUT | ||
|
||
- name: Replace version in package.json | ||
run: jq --arg version "${{ steps.version-string.outputs.version }}" '.version = $version' package.json > package.json | ||
|
||
- name: Package the extension | ||
run: pnpm exec vsce package -o biome.vsix | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Publish | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
inputs: | ||
nightly: | ||
type: boolean | ||
default: true | ||
required: false | ||
description: 'Whether to publish a nightly build' | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
uses: ./.github/workflows/_build.yaml | ||
package: | ||
name: Package | ||
needs: [build] | ||
uses: ./.github/workflows/_package.yaml | ||
with: | ||
# If the workflow was triggered by a schedule event, or the nightly | ||
# input is true, package a nightly build | ||
nightly: ${{ github.event.inputs.nightly || github.event_name == 'schedule' }} | ||
|