Skip to content

Commit

Permalink
Merge pull request #2 from OPERA-Cal-Val/release-and-distribute-workf…
Browse files Browse the repository at this point in the history
…lows

Release and distribute workflows
  • Loading branch information
cmarshak authored Jan 10, 2024
2 parents e81bf76 + e887b5b commit 9f83c44
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/distribute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Distribute to PyPI

on:
push:
tags:
- v*

jobs:
distribute:
runs-on: ubuntu-latest
outputs:
SDIST_VERSION: ${{ steps.build.outputs.version }}
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v1
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools build "setuptools-scm[toml]"
- name: Build distribuion
id: build
run: |
git fetch origin +refs/tags/*:refs/tags/*
export SDIST_VERSION=$(python -m setuptools_scm)
echo "::set-output name=version::${SDIST_VERSION}"
python -m build
- name: upload to PyPI.org
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/labeled-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Is PR labeled?

on:
pull_request:
types:
- opened
- labeled
- unlabeled
- synchronize
branches:
- main

jobs:
call-labeled-pr-check-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected]
16 changes: 16 additions & 0 deletions .github/workflows/release-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Create Release

on:
push:
tags:
- 'v*'

jobs:
call-release-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected]
with:
release_prefix: tile-stitcher
develop_branch: dev
sync_pr_label: team-bot
secrets:
USER_TOKEN: ${{ secrets.OPERA_PST_GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- S1 coherence from 2020;
- Hansen annual mosaics 2000, 2013 - present
- Cop 100m Landcover 2015-2019
* Includes workflows for static analysis and integration testing.
* Includes workflows for static analysis, release to PyPI, and integration testing.

0 comments on commit 9f83c44

Please sign in to comment.