diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 7960bc5ba..a06a48b90 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -5,27 +5,11 @@ on: tags: - v1r0p[0-9]+ pull_request: - # workflow_dispatch: - # inputs: - # tag: - # description: 'Old style tag name, e.g.: v4r3p5' - # required: true - # deploy_github: - # description: 'Create PEP-440 styled tag release in GitHub' - # required: false - # default: false - # deploy_pypi: - # description: 'Create PEP-440 styled tag release in PyPI' - # required: false - # default: false jobs: deploy-pypi: name: PyPI deployment runs-on: "ubuntu-latest" - outputs: - tag_name: ${{ steps.PEP-440.outputs.tag_name }} - target_commitish: ${{ steps.PEP-440.outputs.target_commitish }} if: github.event_name != 'push' || github.repository == 'TaykYoku/WebAppDIRAC' steps: @@ -43,34 +27,22 @@ jobs: id: PEP-440 # if: github.event_name == 'push' run: | - # TAG_NAME=${GITHUB_REF##*/} + echo "git ref: ${GITHUB_REF##*/}" TAG_NAME=v1r0p4 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}" - cat release.notes echo ::set-output name=tag_name::"v$NEW_STYLE" echo ::set-output name=target_commitish::"$(git rev-parse HEAD)" - - create-pep440-release: - name: PEP-440 release deployment - runs-on: "ubuntu-latest" - needs: deploy-pypi - steps: - - run: cat release.notes - - run: git tag - - name: Publish ${{needs.deploy-pypi.outputs.tag_name}} release to GitHub - # if: github.event_name == 'push' || ${{ inputs.deploy_github }} + - run: echo ${{ steps.PEP-440.outputs.tag_name }} + - run: echo ${{ steps.PEP-440.outputs.target_commitish }} + - name: Publish ${{ steps.PEP-440.outputs.tag_name }} release to GitHub + # if: github.event_name == 'push' uses: softprops/action-gh-release@v1 with: - target_commitish: ${{ needs.deploy-pypi.outputs.target_commitish }} + target_commitish: ${{ steps.PEP-440.outputs.target_commitish }} body_path: release.notes - tag_name: ${{needs.deploy-pypi.outputs.tag_name}} + tag_name: ${{ steps.PEP-440.outputs.tag_name }} - create-pypi-release: - name: PyPI release deployment - runs-on: "ubuntu-latest" - needs: [deploy-pypi, create-pep440-release] - steps: - name: Get ${{ steps.PEP-440.outputs.tag_name }} tag uses: actions/checkout@v2 with: @@ -78,7 +50,7 @@ jobs: - name: Build distributions run: python -m build - name: Publish package on PyPI - # if: github.event_name == 'push' || ${{ inputs.deploy_pypi }} + # if: github.event_name == 'push' run: ls dist/ # uses: pypa/gh-action-pypi-publish@master # with: