Skip to content

Commit

Permalink
WIP Release jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsmock committed Nov 21, 2024
1 parent 2d4a375 commit 859b398
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,51 @@ jobs:
env:
DCTEST_IMAGE: dctest
run: ./test/runexamples

# Decide if a release is necessary, perform release checks
check-release:
needs: [ test-node, test-docker ]
name: Check Release
runs-on: ubuntu-latest
# TODO:
#if: startsWith(github.ref, 'refs/tags/') && contains(github.ref, '.')
outputs:
RELEASE_VERSION: ${{ steps.get-version.outputs.RELEASE_VERSION }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with: { submodules: 'recursive', fetch-depth: 0 }

- id: get-version
name: Get release version
run: |
echo "RELEASE_VERSION=$(jq -r .version package.json)" | tee "$GITHUB_ENV" | tee "$GITHUB_OUTPUT"
- name: Check git tag matches release version
run: |
[ "refs/heads/release-workflow" == "${{ github.ref }}" ]
# TODO [ "refs/tags/${RELEASE_VERSION}" == "${{ github.ref }}" ]
release-npm:
needs: [ check-release ]
name: Release NPM
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with: { submodules: 'recursive', fetch-depth: 0 }

release-docker-hub:
needs: [ check-release ]
name: Release Docker Hub
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ needs.check-release.outputs.RELEASE_VERSION }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with: { submodules: 'recursive', fetch-depth: 0 }

- name: Check version
run: |
echo "Should release ${RELEASE_VERSION}"

0 comments on commit 859b398

Please sign in to comment.