mirror of
https://github.com/senju1337/senju.git
synced 2025-12-24 07:39:29 +00:00
chore: setup ci
This commit is contained in:
parent
d64a9bd76d
commit
70631d0465
1 changed files with 50 additions and 0 deletions
50
.github/workflows/release.yaml
vendored
Normal file
50
.github/workflows/release.yaml
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
name: Continuous Delivery
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- chore/ci-setup
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
concurrency: release
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# Note: we need to checkout the repository at the workflow sha in case during the workflow
|
||||||
|
# the branch was updated. To keep PSR working with the configured release branches,
|
||||||
|
# we force a checkout of the desired release branch but at the workflow sha HEAD.
|
||||||
|
- name: Setup | Checkout Repository at workflow sha
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: ${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Setup | Force correct release branch on workflow sha
|
||||||
|
run: |
|
||||||
|
git checkout -B ${{ github.ref_name }} ${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Action | Semantic Version Release
|
||||||
|
id: release
|
||||||
|
# Adjust tag with desired version if applicable.
|
||||||
|
uses: python-semantic-release/python-semantic-release@v9.16.1
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
git_committer_name: "github-actions"
|
||||||
|
git_committer_email: "actions@users.noreply.github.com"
|
||||||
|
|
||||||
|
# - name: Publish | Upload package to PyPI
|
||||||
|
# uses: pypa/gh-action-pypi-publish@v1
|
||||||
|
# if: steps.release.outputs.released == 'true'
|
||||||
|
|
||||||
|
- name: Publish | Upload to GitHub Release Assets
|
||||||
|
uses: python-semantic-release/publish-action@v9.16.1
|
||||||
|
if: steps.release.outputs.released == 'true'
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
tag: ${{ steps.release.outputs.tag }}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue