diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 7c94bcd..068723e 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -3,6 +3,7 @@ name: Deployment on: push: tags: + - 2.0.0a[0-9]+ pull_request: jobs: @@ -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 diff --git a/release.notes b/release.notes index 098bc72..f4b0fa6 100644 --- a/release.notes +++ b/release.notes @@ -1,3 +1,5 @@ +[2.0.0a2] + [v1r3p3] CHANGE: (#83) convert ReadMe to RST NEW: (#80) add deployment action