-
-
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.
ci: generate nightly version string from date and time
- Loading branch information
Showing
1 changed file
with
4 additions
and
21 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 |
---|---|---|
|
@@ -27,18 +27,6 @@ jobs: | |
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Retrieve version from package.json (nightly) | ||
if: ${{ github.event.inputs.nightly }} | ||
id: packageJsonVersion | ||
run: echo "version=$(jq -r '.version' package.json)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Parse version | ||
if: ${{ github.event.inputs.nightly }} | ||
id: version | ||
uses: madhead/[email protected] | ||
with: | ||
version: "${{ steps.packageJsonVersion.outputs.version }}" | ||
|
||
- name: Replace name in package.json (nightly) | ||
if: ${{ github.event.inputs.nightly }} | ||
run: | | ||
|
@@ -53,21 +41,16 @@ jobs: | |
jq '.displayName = "Biome (nightly)"' package.json > $tempfile | ||
mv $tempfile package.json | ||
- name: Generate nightly identifier (nightly) | ||
if: ${{ github.event.inputs.nightly }} | ||
id: nightly-identifier | ||
run: echo "identifier=$(date +'%Y%m%d%H')" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Build nightly version string (nightly) | ||
- name: Generate nightly version identifier (nightly) | ||
if: ${{ github.event.inputs.nightly }} | ||
id: version-string | ||
run: echo "version=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.nightly-identifier.outputs.identifier }}" >> $GITHUB_OUTPUT | ||
id: nightly-version | ||
run: echo "version=$(date +'%Y.%m.%d%H%M')" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Replace version in package.json (nightly) | ||
if: ${{ github.event.inputs.nightly }} | ||
run: | | ||
tempfile=$(mktemp) | ||
jq --arg version "${{ steps.version-string.outputs.version }}" '.version = $version' package.json > $tempfile | ||
jq --arg version "${{ steps.nightly-version.outputs.version }}" '.version = $version' package.json > $tempfile | ||
mv $tempfile package.json | ||
- name: Package the extension | ||
|