Skip to content

Commit

Permalink
Configure release CD
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT committed Dec 4, 2023
1 parent 37314e9 commit 6a4f940
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/publish.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,50 @@
name: Publish
name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+dev[0-9]+"
workflow_dispatch:
inputs:
skip-tests:
type: boolean
description: Skip
default: false
ref:
type: string
description: Tag to release
required: true

permissions:
contents: read

jobs:
pre-commit:
uses: ./.github/workflows/step_pre-commit.yml
if: ! ${{ inputs.skip-tests }}

test-pip:
needs: [ pre-commit ]
uses: ./.github/workflows/step_tests-pip.yml
if: ! ${{ inputs.skip-tests }}

test-conda:
needs: [ test-pip ]
uses: ./.github/workflows/step_tests-conda.yml
if: ! ${{ inputs.skip-tests }}

test-ui:
needs: [ test-pip ]
uses: ./.github/workflows/step_tests-ui.yml
if: ! ${{ inputs.skip-tests }}

build:
needs: [ test-conda, test-ui ]
uses: ./.github/workflows/step_build.yml
with:
upload: true
ref: ${{ inputs.ref }}

publish:
needs: [ build ]
Expand All @@ -50,3 +65,18 @@ jobs:
path: dist
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1

release:
needs: [ publish ]
name: Create release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: softprops/action-gh-release@v1
with:
name: Jupytext ${{ inputs.ref || github.ref_name }}
draft: true
prerelease: ${{ contains(inputs.ref || github.ref, 'rc') }}
generate_release_notes: true
5 changes: 5 additions & 0 deletions .github/workflows/step_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
required: false
default: false
description: Upload build artifacts
ref:
type: string
description: Tag to build

permissions:
contents: read
Expand All @@ -19,6 +22,8 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
Expand Down

0 comments on commit 6a4f940

Please sign in to comment.