Skip to content

Commit

Permalink
Our vx/vx.y tagger seems to have race condition
Browse files Browse the repository at this point in the history
Debugging it is too hard, so hope for the best by shoving it to a separate job.

Also attempted to DRY the version setter by making the binary compilations depend on that job.
  • Loading branch information
mxcl committed Feb 6, 2023
1 parent 839e2b7 commit cdcfbe6
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
# and we want people to be able to just grab the single binaries as
# they wish
compile:
needs: [ci, check]
needs: [ci, check, bundle-src]
permissions:
contents: read
actions: write
Expand All @@ -75,25 +75,26 @@ jobs:
runs-on: ${{ matrix.platform.os }}
name: ${{ matrix.platform.build-id }}
steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
name: tarballs
path: artifacts
- run: tar xJf artifacts/tea-${{ needs.check.outputs.version }}.tar.xz
- uses: teaxyz/setup@v0
id: tea

- run: echo "export default function() { return '${{ needs.check.outputs.version }}' }" > src/hooks/useVersion.ts
- run: deno task compile
- run: test "$(./tea --version)" = "tea ${{ needs.check.outputs.version }}"
- run: tar cJf tea-${{ steps.tea.outputs.version }}+${{ matrix.platform.build-id }}.tar.xz ./tea
- run: tar cJf tea-${{ needs.check.outputs.version }}+${{ matrix.platform.build-id }}.tar.xz ./tea
- uses: actions/upload-artifact@v3
with:
name: tarballs
path: tea-${{ steps.tea.outputs.version }}+${{ matrix.platform.build-id }}.tar.xz
path: tea-${{ needs.check.outputs.version }}+${{ matrix.platform.build-id }}.tar.xz
if-no-files-found: error
- run: mv ./tea tea-${{ matrix.platform.build-id }}
- uses: actions/upload-artifact@v3
with:
name: binaries
path: tea-${{ matrix.platform.build-id }}
path: tea-${{ needs.check.outputs.version }}+${{ matrix.platform.build-id }}.tar.xz
if-no-files-found: error

bundle-src:
Expand All @@ -118,8 +119,6 @@ jobs:
contents: write
needs: [check, compile, bundle-src]
runs-on: ubuntu-latest
env:
TAG: v${{ needs.check.outputs.version }}
steps:
- uses: actions/checkout@v3

Expand All @@ -128,10 +127,6 @@ jobs:
name: tarballs
path: artifacts

- run: |
git tag ${{ env.TAG }}
git push origin ${{ env.TAG }}
# says `no changes` every time… 🤦🏼
# - uses: mikepenz/release-changelog-builder-action@v3
# id: build_changelog
Expand All @@ -140,16 +135,11 @@ jobs:

- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG }}
tag_name: v${{ needs.check.outputs.version }}
files: artifacts/*
body: ${{ steps.build_changelog.outputs.changelog }}
# body: ${{ steps.build_changelog.outputs.changelog }}
fail_on_unmatched_files: true

- uses: fischerscode/tagger@v0
with:
tag: ${{ env.TAG }}
prefix: v

bump-tap:
needs: [release]
runs-on: ubuntu-latest
Expand All @@ -161,6 +151,7 @@ jobs:
ref: main
token: ${{secrets.TEMP_JACOBS_GITHUB_PAT}}

# these are the binaries that curl https://tea.xyz/platform/arch/ download
upload-binaries:
needs: [release]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -190,7 +181,7 @@ jobs:
--distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }}
--paths

smoke-setup:
smoke-teaxyz-setup-github-action:
needs: [upload-binaries]
runs-on: ubuntu-latest
steps:
Expand All @@ -201,3 +192,14 @@ jobs:
ref: main
token: ${{secrets.TEMP_JACOBS_GITHUB_PAT}}
wait-for-completion: false

vx-tagger:
needs: [upload-binaries]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: fischerscode/tagger@v0
with:
tag: v${{ needs.check.outputs.version }}
prefix: v

0 comments on commit cdcfbe6

Please sign in to comment.