Skip to content

Commit

Permalink
GitHub workflows: Added publish_release.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaasRostock committed Jan 10, 2024
1 parent 200eac8 commit c585eee
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/_merge_into_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Merge into release

on:
workflow_call:
secrets:
RELEASE_TOKEN:
required: true

jobs:
merge_into_release:
name: Merge ${{ github.event.ref }} -> release branch
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v4
with:
# Fetch the whole history to prevent unrelated history errors
fetch-depth: 0
# The branch you want to checkout (usually equal to `branchtomerge`)
# ref: ${{ github.event.ref }}
- uses: devmasx/merge-branch@v1.4.0
with:
type: now
target_branch: release
github_token: ${{ secrets.RELEASE_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/_publish_package.yml.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish Package to pypi

on:
workflow_call:
secrets:
PYPI_API_TOKEN:
required: true

jobs:
publish:
name: Publish package
runs-on: ubuntu-latest
environment: pypi
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: ./dist/
- uses: pypa/gh-action-pypi-publish@v1.5.2
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish Release
run-name: Publish Release ${{ github.event.ref }} created by @${{ github.actor }}

on:
push:
tags:
- v*

jobs:
# requirements_files:
# uses: ./.github/workflows/_requirements_files.yml
# build_package:
# needs:
# - requirements_files
# uses: ./.github/workflows/_build_package.yml
# publish_package:
# needs:
# - build_package
# uses: ./.github/workflows/_publish_package.yml
# secrets:
# PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
merge_into_release:
uses: ./.github/workflows/_merge_into_release.yml
secrets:
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}

0 comments on commit c585eee

Please sign in to comment.