-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): Tag deno builds with full version, truncate history (#1993)
* chore(ci): Fetch git history so git describe succeeds * chore(ci): Truncate deno-build history Save git-describe output to avoid a second deep checkout.
- Loading branch information
Showing
1 changed file
with
12 additions
and
9 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 |
---|---|---|
|
@@ -17,6 +17,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Save describe stamp | ||
id: describe | ||
run: echo version=$( git describe ) >> $GITHUB_OUTPUT | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
|
@@ -61,27 +66,25 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.PUSH_TOKEN }} | ||
- name: Set credentials | ||
run: | | ||
git config --global user.name "BIDS-Bot" | ||
git config --global user.email "[email protected]" | ||
- name: Save describe stamp | ||
run: echo VERSION=$( git describe ) >> $GITHUB_ENV | ||
- name: Checkout orphan | ||
- name: Reset deno-build to orphan | ||
run: | | ||
git checkout deno-build | ||
git rm -rf . | ||
git checkout --orphan deno-build | ||
git reset --hard | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: main | ||
path: main | ||
- name: Commit to new branch | ||
run: | | ||
mv main/main.js . | ||
mv main/bids-validator.js . | ||
mv main/main.js main/bids-validator.js . | ||
git add main.js bids-validator.js | ||
git commit -m "BLD: $VERSION [skip ci]" || true | ||
env: | ||
VERSION: ${{ needs.build.describe.version }} | ||
- name: Push | ||
run: git push origin deno-build | ||
run: git push -f origin deno-build |