Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #92 from TaykYoku/2.0_init
Browse files Browse the repository at this point in the history
[2.0] change github deployment workflow
  • Loading branch information
TaykYoku authored Jun 12, 2022
2 parents bff3e11 + 8063dfe commit 35d0098
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Deployment
on:
push:
tags:
- 2.0.0a[0-9]+
pull_request:

jobs:
Expand All @@ -19,27 +20,18 @@ jobs:
run: pip install build readme_renderer diraccfg
- name: Validate README for PyPI
run: python -m readme_renderer README.rst -o /tmp/README.html
- name: Make PEP-440 style release on GitHub
id: PEP-440
if: github.event_name == 'push'
run: |
TAG_NAME=${GITHUB_REF##*/}
NEW_STYLE=$(python -c "import diraccfg; major, minor, patch, pre = diraccfg.parseVersion('${TAG_NAME}'); print(f'{major}.{minor}.{patch}', f'a{pre}' if pre else '', sep='')")
echo "Converted ${TAG_NAME} version to ${NEW_STYLE}"
echo ::set-output name=tag_name::"v$NEW_STYLE"
echo ::set-output name=target_commitish::"$(git rev-parse HEAD)"
- name: Publish ${{ steps.PEP-440.outputs.tag_name }} release to GitHub
- name: Publish ${GITHUB_REF##*/} release to GitHub
if: github.event_name == 'push'
uses: softprops/action-gh-release@v1
with:
target_commitish: ${{ steps.PEP-440.outputs.target_commitish }}
target_commitish: $(git rev-parse HEAD)
body_path: release.notes
tag_name: ${{ steps.PEP-440.outputs.tag_name }}
- name: Get ${{ steps.PEP-440.outputs.tag_name }} tag
tag_name: ${GITHUB_REF##*/}
- name: Get ${GITHUB_REF##*/} tag
if: github.event_name == 'push'
uses: actions/checkout@v2
with:
ref: ${{ steps.PEP-440.outputs.tag_name }}
ref: ${GITHUB_REF##*/}
- name: Build distributions
run: python -m build
- name: Publish package on PyPI
Expand Down
2 changes: 2 additions & 0 deletions release.notes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[2.0.0a2]

[v1r3p3]
CHANGE: (#83) convert ReadMe to RST
NEW: (#80) add deployment action
Expand Down

0 comments on commit 35d0098

Please sign in to comment.