Skip to content

Commit

Permalink
testing PR acquisition
Browse files Browse the repository at this point in the history
  • Loading branch information
coordt committed Dec 18, 2023
1 parent c8f0d45 commit 67ab83d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 33 deletions.
4 changes: 0 additions & 4 deletions .github/actions/package-and-upload-artifacts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ inputs:
runs:
using: 'composite'
steps:
- name: show runid
shell: bash
run: |
echo "::notice::GitHub Run ID is ${{ github.run_id }}"
- name: Parse changelog for release notes
shell: bash
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/actions/release/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ runs:
with:
name: release-notes

# - name: Create a GitHub release
# uses: softprops/action-gh-release@v1
# with:
# files: dist/*
# tag_name: "${{ env.TAG_NAME }}"
# body_path: release-notes.md
- name: Create a GitHub release
uses: softprops/action-gh-release@v1
with:
files: dist/*
tag_name: "${{ env.TAG_NAME }}"
body_path: release-notes.md

- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/version-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ jobs:
echo "RELEASE_KIND=$RELEASE_KIND" >> $GITHUB_ENV
echo "release-kind=$RELEASE_KIND" >> $GITHUB_OUTPUT
- name: Get Pull Request Number
id: pr
run: |
PR_NUMBER=$(gh pr view --json number -q .number || echo "${{ github.event.number }}")
echo "pull_request_number=${PR_NUMBER}" >> $GITHUB_OUTPUT
echo "::notice::PR_NUMBER is ${PR_NUMBER}"
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PAT }}

- name: Bump version dry run
if: ${{ env.RELEASE_KIND != 'no-release' }}
shell: bash
run: |
PR_NUMBER=$(gh pr view --json number -q .number || echo "")
REVISION=$(git describe --tags --long | awk -F- '{print $2}')
export PR_NUMBER REVISION
# This will display a full log of what would happen if we were to bump the version.
bump-my-version bump --dry-run --verbose "$RELEASE_KIND"
Expand Down
28 changes: 9 additions & 19 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,17 @@ jobs:
- name: Get Pull Request Number
id: pr
run: |
PR_NUMBER=$(gh pr view --json number -q .number || echo "")
PR_NUMBER=$(gh pr view --json number -q .number || echo "${{ github.event.number }}")
echo "pull_request_number=${PR_NUMBER}" >> $GITHUB_OUTPUT
echo "::notice::PR_NUMBER is ${PR_NUMBER}"
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
echo "::notice::event number is ${{ github.event.number }}"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}

- name: Bump version
if: ${{ env.RELEASE_KIND != 'no-release' }}
shell: bash
run: |
# PR_NUMBER=$(gh pr view --json number -q .number || echo "")
# echo "::notice::PR_NUMBER is: ${PR_NUMBER}"
# echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
# export PR_NUMBER
case "$RELEASE_KIND" in
major|minor|patch)
bump-my-version bump --allow-dirty --verbose "$RELEASE_KIND"
Expand All @@ -70,18 +65,13 @@ jobs:
# echo "Intentionally not bumping version for dev release"
;;
esac
env:
GH_TOKEN: ${{ github.token }}
- name: show runid
run: |
echo "::notice::GitHub Run ID is ${{ github.run_id }}"
- name: Package and upload artifacts
if: ${{ env.PACKAGE == 'true' }}
uses: ./.github/actions/package-and-upload-artifacts
with:
tag-name: ${{ env.TAG_NAME }}
# - name: Package and upload artifacts
# if: ${{ env.PACKAGE == 'true' }}
# uses: ./.github/actions/package-and-upload-artifacts
# with:
# tag-name: ${{ env.TAG_NAME }}

- name: Create a GitHub release
if: ${{ env.PACKAGE == 'true' }}
uses: ./.github/actions/release
# - name: Create a GitHub release
# if: ${{ env.PACKAGE == 'true' }}
# uses: ./.github/actions/release

0 comments on commit 67ab83d

Please sign in to comment.