Skip to content

Commit f3889c2

Browse files
Working on CI/CD
1 parent 8c8f684 commit f3889c2

File tree

4 files changed

+73
-55
lines changed

4 files changed

+73
-55
lines changed

.github/workflows/release-build.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
name: Release Pipeline
2-
1+
name: Build Release Artifacts
32

43
on:
54
workflow_dispatch:
@@ -11,14 +10,14 @@ on:
1110
# - 'releases/**'
1211
# - 'main'
1312
# - 'carl/**' # FIXME: Remove. This is for testing/development.
13+
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
1414

1515
env:
1616
PYTHON_VERSION: "3.13"
1717

1818
jobs:
1919
build-wheel:
2020
name: Build Wheel packages
21-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2221
runs-on: ubuntu-latest
2322
steps:
2423
- name: Checkout code
@@ -30,6 +29,16 @@ jobs:
3029
- name: 'Nox: Build Wheel'
3130
run: |
3231
nox -s build_wheel
32+
- name: Save Artifacts - Wheel
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: planet-auth-wheel
36+
path: dist/planet_auth*.whl
37+
- name: Save Artifacts - Source Package
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: planet-auth-src-targz
41+
path: dist/planet_auth*.tar.gz
3342

3443
build-docs:
3544
name: Build MKDocs Documentation
@@ -56,6 +65,18 @@ jobs:
5665
uses: ./.github/actions/python-common-setup
5766
with:
5867
python-version: ${{ env.PYTHON_VERSION }}
68+
- name: Download Wheel Package
69+
uses: actions/download-artifact@v4
70+
with:
71+
name: planet-auth-wheel
72+
- name: Download Source Package
73+
uses: actions/download-artifact@v4
74+
with:
75+
name: planet-auth-src-targz
76+
- name: 'Test Debug step'
77+
run: |
78+
ls -la dist
79+
false
5980
- name: 'Nox: Publish to PyPi'
6081
run: |
6182
nox -s release_pypi
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release Orchestration
2+
3+
# TODO: Tag and branch
4+
# TODO: insure we can only release from privileged branches/tags
5+
# TODO: watch for releasing the same version more than once
6+
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
test_input:
11+
description: "Workflow test user input"
12+
type: string
13+
required: true
14+
default: "test input default value"
15+
16+
env:
17+
PYTHON_VERSION: "3.13"
18+
19+
jobs:
20+
test:
21+
name: "Prerelease Test"
22+
uses: ./.github/workflows/test.yml
23+
package:
24+
name: "Build Release Artifacts"
25+
uses: ./.github/workflows/release-build.yml
26+
needs: test
27+
# publish:
28+
# name: "Publish "
29+
# uses: ./.github/workflows/release-publish.yml
30+
# needs: package
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Publish Release
2+
3+
# FIXME: How can I restrict actually publishing a releae to specific users/tags/branches?
4+
5+
on:
6+
workflow_call:
7+
#workflow_run:
8+
# workflows: ["Release Trigger"]
9+
# types: ["completed"]
10+
# branches:
11+
# - 'releases/**'
12+
# - 'main'
13+
# - 'carl/**' # FIXME: Remove. This is for testing/development.
14+
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
15+
16+
env:
17+
PYTHON_VERSION: "3.13"
18+
19+
jobs:

.github/workflows/release-trigger.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)