Skip to content

Commit 67ab83d

Browse files
committed
testing PR acquisition
1 parent c8f0d45 commit 67ab83d

File tree

4 files changed

+25
-33
lines changed

4 files changed

+25
-33
lines changed

.github/actions/package-and-upload-artifacts/action.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ inputs:
77
runs:
88
using: 'composite'
99
steps:
10-
- name: show runid
11-
shell: bash
12-
run: |
13-
echo "::notice::GitHub Run ID is ${{ github.run_id }}"
1410
- name: Parse changelog for release notes
1511
shell: bash
1612
run: |

.github/actions/release/action.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ runs:
2727
with:
2828
name: release-notes
2929

30-
# - name: Create a GitHub release
31-
# uses: softprops/action-gh-release@v1
32-
# with:
33-
# files: dist/*
34-
# tag_name: "${{ env.TAG_NAME }}"
35-
# body_path: release-notes.md
30+
- name: Create a GitHub release
31+
uses: softprops/action-gh-release@v1
32+
with:
33+
files: dist/*
34+
tag_name: "${{ env.TAG_NAME }}"
35+
body_path: release-notes.md
3636

3737
- name: Upload package to PyPI
3838
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/version-preview.yaml

+10-4
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,20 @@ jobs:
3232
echo "RELEASE_KIND=$RELEASE_KIND" >> $GITHUB_ENV
3333
echo "release-kind=$RELEASE_KIND" >> $GITHUB_OUTPUT
3434
35+
- name: Get Pull Request Number
36+
id: pr
37+
run: |
38+
PR_NUMBER=$(gh pr view --json number -q .number || echo "${{ github.event.number }}")
39+
echo "pull_request_number=${PR_NUMBER}" >> $GITHUB_OUTPUT
40+
echo "::notice::PR_NUMBER is ${PR_NUMBER}"
41+
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.PAT }}
44+
3545
- name: Bump version dry run
3646
if: ${{ env.RELEASE_KIND != 'no-release' }}
3747
shell: bash
3848
run: |
39-
PR_NUMBER=$(gh pr view --json number -q .number || echo "")
40-
REVISION=$(git describe --tags --long | awk -F- '{print $2}')
41-
export PR_NUMBER REVISION
42-
4349
# This will display a full log of what would happen if we were to bump the version.
4450
bump-my-version bump --dry-run --verbose "$RELEASE_KIND"
4551

.github/workflows/version.yaml

+9-19
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,17 @@ jobs:
3838
- name: Get Pull Request Number
3939
id: pr
4040
run: |
41-
PR_NUMBER=$(gh pr view --json number -q .number || echo "")
41+
PR_NUMBER=$(gh pr view --json number -q .number || echo "${{ github.event.number }}")
4242
echo "pull_request_number=${PR_NUMBER}" >> $GITHUB_OUTPUT
4343
echo "::notice::PR_NUMBER is ${PR_NUMBER}"
4444
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
45-
echo "::notice::event number is ${{ github.event.number }}"
4645
env:
4746
GITHUB_TOKEN: ${{ secrets.PAT }}
4847

4948
- name: Bump version
5049
if: ${{ env.RELEASE_KIND != 'no-release' }}
5150
shell: bash
5251
run: |
53-
# PR_NUMBER=$(gh pr view --json number -q .number || echo "")
54-
# echo "::notice::PR_NUMBER is: ${PR_NUMBER}"
55-
# echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
56-
# export PR_NUMBER
5752
case "$RELEASE_KIND" in
5853
major|minor|patch)
5954
bump-my-version bump --allow-dirty --verbose "$RELEASE_KIND"
@@ -70,18 +65,13 @@ jobs:
7065
# echo "Intentionally not bumping version for dev release"
7166
;;
7267
esac
73-
env:
74-
GH_TOKEN: ${{ github.token }}
75-
- name: show runid
76-
run: |
77-
echo "::notice::GitHub Run ID is ${{ github.run_id }}"
7868
79-
- name: Package and upload artifacts
80-
if: ${{ env.PACKAGE == 'true' }}
81-
uses: ./.github/actions/package-and-upload-artifacts
82-
with:
83-
tag-name: ${{ env.TAG_NAME }}
69+
# - name: Package and upload artifacts
70+
# if: ${{ env.PACKAGE == 'true' }}
71+
# uses: ./.github/actions/package-and-upload-artifacts
72+
# with:
73+
# tag-name: ${{ env.TAG_NAME }}
8474

85-
- name: Create a GitHub release
86-
if: ${{ env.PACKAGE == 'true' }}
87-
uses: ./.github/actions/release
75+
# - name: Create a GitHub release
76+
# if: ${{ env.PACKAGE == 'true' }}
77+
# uses: ./.github/actions/release

0 commit comments

Comments
 (0)