Skip to content

Commit c9447ba

Browse files
authored
Update automatic prereleases in github actions (#415)
1 parent 3d4f309 commit c9447ba

File tree

5 files changed

+20
-11
lines changed

5 files changed

+20
-11
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
push:
1212
branches:
1313
- main
14+
workflow_dispatch:
1415

1516
concurrency:
1617
group: ${{ github.workflow }}-${{ github.ref }}
@@ -64,6 +65,7 @@ jobs:
6465
- uses: actions/checkout@v4
6566
with:
6667
fetch-depth: 0
68+
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
6769
- run: ./scripts/run_test_wrapper.sh
6870
- run: ./scripts/sonar_test_results_merge.sh
6971
- name: SonarQube Scan
@@ -84,9 +86,12 @@ jobs:
8486
steps:
8587
- uses: actions/checkout@v4
8688
with:
87-
fetch-tags: true
89+
fetch-depth: 0
90+
ref: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
8891
- uses: actions/download-artifact@v5
8992
with:
9093
name: package-artifact
9194
- name: create release
9295
run: ./scripts/create_release.sh
96+
env:
97+
GH_TOKEN: ${{ github.token }}

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# [1.3.73](https://github.com/kenherring/ablunit-test-runner/releases/tag/1.3.73) - 2025-10-19 (pre-release)
1+
# [1.3.75](https://github.com/kenherring/ablunit-test-runner/releases/tag/1.3.75) - 2025-10-19 (pre-release)
22

3+
* Update automatic prereleases in github actions (#415)
34
* Update automatic prereleases in github actions (#414)
45
* Add configuration options for disabling competion items (#413)
56
* Set branch name in CI run for main branch (#412)
@@ -90,7 +91,7 @@
9091
* Bump mocha from 11.4.0 to 11.5.0 (#301)
9192
* Bump @types/node from 22.15.17 to 22.15.21 (#304)
9293

93-
**Full Changelog**: [1.3.0...1.3.73](https://github.com/kenherring/ablunit-test-runner/compare/1.3.71...1.3.73)
94+
**Full Changelog**: [1.3.0...1.3.75](https://github.com/kenherring/ablunit-test-runner/compare/1.3.73...1.3.75)
9495

9596
# [1.3.0](https://github.com/kenherring/ablunit-test-runner/releases/tag/1.3.0) - 2025-05-21
9697

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ablunit-test-runner",
33
"displayName": "ABLUnit Test Runner",
44
"description": "OpenEdge ABLUnit test runner for VSCode",
5-
"version": "1.3.73",
5+
"version": "1.3.75",
66
"engineStrict": true,
77
"galleryBanner": {
88
"color": "#007ACC",

scripts/create_release.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,27 @@
99
main () {
1010
log_it
1111

12+
if [ ! -f package.json ]; then
13+
log_error "package.json not found - is the repo checked out?"
14+
exit 1
15+
fi
16+
1217
PACKAGE_VERSION=$(jq -r '.version' package.json)
13-
log_it "PACKAGE_VERSION=$PACKAGE_VERSION"
1418
if git tag -l --sort=version:refname | grep -q "^$PACKAGE_VERSION$"; then
1519
log_error "tag exists for PACKAGE_VERSION=$PACKAGE_VERSION"
1620
exit 1
1721
fi
1822

1923
PRERELEASE=false
2024
PATCH_VERSION=${PACKAGE_VERSION##*.}
21-
log_it "PATCH_VERSION=$PATCH_VERSION"
2225
if [ "$((PATCH_VERSION % 2))" = "1" ]; then
2326
PRERELEASE=true
2427
fi
25-
log_it "PRERELEASE=$PRERELEASE"
2628

29+
if [ -z "$(git tag)" ]; then
30+
git fetch --tags
31+
fi
2732
LATEST_RELEASE_TAG=$(git tag -l '[0-9].*' --sort=version:refname | grep -E "^[0-9]+\.[0-9]+\.[0-9]*[0,2,4,6,8]$" | tail -1)
28-
log_it "LATEST_RELEASE_TAG=$LATEST_RELEASE_TAG"
2933

3034
ARGS=()
3135
if $PRERELEASE; then
@@ -41,7 +45,6 @@ main () {
4145
ARGS+=(--generate-notes)
4246
ARGS+=(--notes-start-tag "$LATEST_RELEASE_TAG")
4347
ARGS+=(--target $(git rev-parse HEAD))
44-
log_it "ARGS=${ARGS[*]}"
4548

4649
gh release create "$PACKAGE_VERSION" "${ARGS[@]}"
4750
log_it "release created for PACKAGE_VERSION=$PACKAGE_VERSION"

0 commit comments

Comments
 (0)