diff --git a/.github/actions/python-project-naming/action.yaml b/.github/actions/python-project-naming/action.yaml index 88afaeb..c0b2d3d 100644 --- a/.github/actions/python-project-naming/action.yaml +++ b/.github/actions/python-project-naming/action.yaml @@ -56,6 +56,7 @@ runs: echo "matches_repo_name=$MATCHES_REPO_NAME" >> "$GITHUB_ENV" # Write as action output + echo "github_repository_name=$GITHUB_REPOSITORY_NAME" >> "$GITHUB_OUTPUT" echo "python_project_name=$PYTHON_PROJECT_NAME" >> "$GITHUB_OUTPUT" echo "matches_repo_name=$MATCHES_REPO_NAME" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/github-release.yaml b/.github/workflows/github-release.yaml index 01ec262..c814c86 100644 --- a/.github/workflows/github-release.yaml +++ b/.github/workflows/github-release.yaml @@ -26,17 +26,15 @@ jobs: contents: write steps: - - name: "Capture repository/project name" - shell: bash - run: | - # Capture repository/project name - REPOSITORY_NAME=$(basename ${{ github.repository }}) - echo "repository=$REPOSITORY_NAME" >> "$GITHUB_ENV" + - name: "Extract project/repository naming" + id: naming + # yamllint disable-line rule:line-length + uses: os-climate/osc-github-devops/.github/actions/python-project-naming@main - name: "⬇ Download build artefacts" uses: actions/download-artifact@v4 with: - name: ${{ env.repository }}-${{ inputs.build_tag }} + name: ${{ env.python_project_name }}-${{ inputs.build_tag }} path: ${{ env.BUILD_ARTEFACTS }} - name: "Check tag matches pyproject.toml" @@ -52,7 +50,8 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} prerelease: ${{ inputs.PRE_RELEASE }} tag_name: ${{ inputs.build_tag }} - name: "${{ env.repository }} ${{ inputs.build_tag }}" + name: "${{ env.python_project_name }} ${{ inputs.build_tag }}" + # ToDo: Incorporate release notes, etc. # body_path: ${{ github.workspace }}/CHANGELOG.rst files: | diff --git a/.github/workflows/python-build-matrix.yaml b/.github/workflows/python-build-matrix.yaml index 92d07bb..37e468a 100644 --- a/.github/workflows/python-build-matrix.yaml +++ b/.github/workflows/python-build-matrix.yaml @@ -57,6 +57,11 @@ jobs: with: python-version: ${{ inputs.python_version }} + - name: "Extract project/repository naming" + id: naming + # yamllint disable-line rule:line-length + uses: os-climate/osc-github-devops/.github/actions/python-project-naming@main + - name: "Build Python project" id: python-matrix-builds uses: os-climate/osc-github-devops/.github/actions/python-build-project@main @@ -68,18 +73,11 @@ jobs: # yamllint disable-line rule:line-length uses: os-climate/osc-github-devops/.github/actions/python-twine-check@main - - name: "Capture repository/project name" - shell: bash - run: | - # Capture repository/project name - REPOSITORY_NAME=$(basename ${{ github.repository }}) - echo "repository=$REPOSITORY_NAME" >> "$GITHUB_ENV" - - name: "Upload build artefacts" uses: actions/upload-artifact@v4 if: inputs.python_version == inputs.ARTEFACT_PYTHON with: - name: ${{ env.repository }}-${{ inputs.build_tag }} + name: ${{ env.python_project_name }}-${{ inputs.build_tag }} path: ${{ inputs.ARTEFACT_LOCATION }} # This step optional and must be explicitly requested (pass the relevant input) diff --git a/.github/workflows/repository.yaml b/.github/workflows/repository.yaml index fc8d614..8d86558 100644 --- a/.github/workflows/repository.yaml +++ b/.github/workflows/repository.yaml @@ -118,11 +118,6 @@ jobs: # yamllint disable-line rule:line-length uses: os-climate/osc-github-devops/.github/actions/python-versions-matrix@main - - name: "Extract project/repository naming" - id: naming - # yamllint disable-line rule:line-length - uses: os-climate/osc-github-devops/.github/actions/python-project-naming@main - python-build: name: "Build" uses: os-climate/osc-github-devops/.github/workflows/python-build-matrix.yaml@main diff --git a/test.txt b/test.txt deleted file mode 100644 index e69de29..0000000