Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: allow snapshot release from main #570

Merged
merged 2 commits into from
Nov 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Release
on:
workflow_dispatch:
inputs:
full-release:
type: boolean
description: |
Full release, i.e., non-snapshot.
This is only respected when the workflow runs on the main branch.

permissions:
contents: write
Expand All @@ -12,6 +18,8 @@ jobs:
runs-on:
- ubuntu-22.04
timeout-minutes: 10
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -27,14 +35,10 @@ jobs:
- name: Assemble
run: task jvmAssemble
- name: Publish Release
if: ${{ github.ref == 'refs/heads/main' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.ref == 'refs/heads/main' && github.event.inputs.full-release == 'true' }}
run: task jvmPublishRelease
- name: Publish Snapshot
if: ${{ github.ref != 'refs/heads/main' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event.inputs.full-release != 'true' }}
run: task jvmPublishSnapshot VERSION=$(cat version)-SNAPSHOT-${{ github.run_number }}${{ github.run_attempt }}
release-python-client:
needs: release-plugin
Expand All @@ -57,17 +61,15 @@ jobs:
run: envsubst < .github/workflows/pypirc.template > $HOME/.pypirc
- name: Setup Setuptools
run: python3 -m pip install setuptools
- name: Publish to pypi.org
if: ${{ github.ref == 'refs/heads/main' }}
- name: Publish Release
if: ${{ github.ref == 'refs/heads/main' && github.event.inputs.full-release == 'true' }}
run: task pyPublishRelease
- name: Publish to test.pypi.org
if: ${{ github.ref != 'refs/heads/main' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Snapshot
if: ${{ github.event.inputs.full-release != 'true' }}
run: task pyPublishSnapshot VERSION=$(cat version)-dev${{ github.run_number }}${{ github.run_attempt }}
release-docs:
needs: release-python-client
if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.ref == 'refs/heads/main' && github.event.inputs.full-release == 'true' }}
runs-on:
- ubuntu-22.04
timeout-minutes: 10
Expand Down