Skip to content

Commit

Permalink
chore(ci): Tag deno builds with full version, truncate history (#1993)
Browse files Browse the repository at this point in the history
* 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
effigies authored Jun 13, 2024
1 parent 08f68e1 commit 2db52e8
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/deno_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 2db52e8

Please sign in to comment.