Skip to content

Commit

Permalink
Ab#54101 node20 updates (#73)
Browse files Browse the repository at this point in the history
* Updating actions to use node20 for get-primary-language ab#54101
* update add-and-commit
* finalize node20 update in add-and-commit v9.1.4
* update in action-create-release repo release-3.2 sha 8718f34 (ab#54101-node20-update) branch:  kf maintains a separate fork of this repo from zendesk
* Node20 updates: catalog add-and-commit, dotnet upload-release-asset
  • Loading branch information
fiddlermikey authored Jan 30, 2024
1 parent a6d5f97 commit a359e95
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup dotnet
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
- name: Upload Release Asset (x64)
if: success() && env.CREATE_RELEASE == 'True'
id: upload-release-asset-x64
uses: keyfactor/upload-release-asset@v1.1
uses: keyfactor/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Show generated README.md
run: echo $(cat README.md)

- uses: Keyfactor/[email protected].3
- uses: Keyfactor/[email protected].4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
33 changes: 17 additions & 16 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ on:
value: ${{ jobs.create-github-release.outputs.release_url }}
IS_FULL_RELEASE:
description: The upload URL for build artifacts for this release
value: ${{ jobs.get-versions.outputs.IS_FULL_RELEASE }}
value: ${{ jobs.create-github-release-workflow.outputs.IS_FULL_RELEASE }}
pull_request:
types: [opened, closed, synchronize]
push:

jobs:
call-create-github-release-workflow:
call-check-file-action:
uses: keyfactor/cpr-release-checks/.github/workflows/check-files.yml@main
get-versions:

create-github-release-workflow:
runs-on: ubuntu-latest
outputs:
PR_BASE_REF: ${{ steps.set-outputs.outputs.PR_BASE_REF }}
Expand Down Expand Up @@ -121,30 +122,30 @@ jobs:
echo "LATEST_TAG=${{ env.LATEST_TAG }}" | tee -a "$GITHUB_OUTPUT"
create-github-release:
needs: get-versions
if: github.event_name == 'pull_request' && needs.get-versions.outputs.IS_RELEASE_BRANCH == 'True'
needs: create-github-release-workflow
if: github.event_name == 'pull_request' && needs.create-github-release-workflow.outputs.IS_RELEASE_BRANCH == 'True'
outputs:
release_version: ${{ steps.create_release.outputs.current_tag }}
release_url: ${{ steps.create_release.outputs.upload_url }}
runs-on: ubuntu-latest
steps:
- run: |
echo "INC_LEVEL=${{ needs.get-versions.outputs.INC_LEVEL}}"
echo "INC_LEVEL=${{ needs.create-github-release-workflow.outputs.INC_LEVEL}}"
- name: Check if initial release
if: needs.get-versions.outputs.LATEST_TAG == ''
if: needs.create-github-release-workflow.outputs.LATEST_TAG == ''
run: |
echo "INITIAL_VERSION=${{needs.get-versions.outputs.PR_BASE_TAG}}.0-rc.0" | tee -a "$GITHUB_STEP_SUMMARY" | tee -a "$GITHUB_ENV"
echo "MANUAL_VERSION=${{needs.get-versions.outputs.PR_BASE_TAG}}.0-rc.0" | tee -a "$GITHUB_ENV"
echo "INITIAL_VERSION=${{needs.create-github-release-workflow.outputs.PR_BASE_TAG}}.0-rc.0" | tee -a "$GITHUB_STEP_SUMMARY" | tee -a "$GITHUB_ENV"
echo "MANUAL_VERSION=${{needs.create-github-release-workflow.outputs.PR_BASE_TAG}}.0-rc.0" | tee -a "$GITHUB_ENV"
- name: Set semver info
id: set-semver-info
if: needs.get-versions.outputs.LATEST_TAG != ''
if: needs.create-github-release-workflow.outputs.LATEST_TAG != ''
uses: fiddlermikey/action-bump-semver@main
with:
current_version: ${{ needs.get-versions.outputs.LATEST_TAG}}
level: ${{ needs.get-versions.outputs.INC_LEVEL}}
current_version: ${{ needs.create-github-release-workflow.outputs.LATEST_TAG}}
level: ${{ needs.create-github-release-workflow.outputs.INC_LEVEL}}
preID: rc
- name: Show next sem-version
if: needs.get-versions.outputs.LATEST_TAG != ''
if: needs.create-github-release-workflow.outputs.LATEST_TAG != ''
run: |
echo "MANUAL_VERSION=${{ steps.set-semver-info.outputs.new_version }}" > "$GITHUB_ENV"
- run: |
Expand All @@ -155,17 +156,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MANUAL_VERSION: ${{ env.MANUAL_VERSION }}
if: github.event_name == 'pull_request' && needs.get-versions.outputs.IS_RELEASE_BRANCH == 'True'
if: github.event_name == 'pull_request' && needs.create-github-release-workflow.outputs.IS_RELEASE_BRANCH == 'True'
with:
release_name: ${{ env.MANUAL_VERSION }}
body: |
[Changelog](/./CHANGELOG.md)
[Readme](/./README.md)
For the latest README.md updates visit the [Main Page](/../main) for this repository
draft: false
prerelease: ${{ needs.get-versions.outputs.IS_PRE_RELEASE == 'True'}}
prerelease: ${{ needs.create-github-release-workflow.outputs.IS_PRE_RELEASE == 'True'}}
prerelease_suffix: rc
tag_name: ${{ env.MANUAL_VERSION }}
auto_increment_type: ${{ (needs.get-versions.outputs.IS_PRE_RELEASE == 'True') && 'prerelease' || 'patch' }}
auto_increment_type: ${{ (needs.create-github-release-workflow.outputs.IS_PRE_RELEASE == 'True') && 'prerelease' || 'patch' }}
tag_schema: semantic
commitish: ${{ github.sha }}
6 changes: 3 additions & 3 deletions .github/workflows/starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Read primary language
id: read
uses: fiddlermikey/action-get-primary-language@v1.0
uses: fiddlermikey/action-get-primary-language@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Display type
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
echo "platform_matrix=`cat integration-manifest.json | jq '.platform_matrix'`" | tee -a $GITHUB_OUTPUT | tee -a $GITHUB_STEP_SUMMARY

call-create-github-release-workflow:
uses: Keyfactor/actions/.github/workflows/github-release.yml@v2
uses: Keyfactor/actions/.github/workflows/github-release.yml@ab#54101-node20-updates

call-dotnet-build-and-release-workflow:
needs: [call-get-primary-language, call-assign-from-json-workflow, call-create-github-release-workflow]
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:

call-generate-readme-workflow:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: Keyfactor/actions/.github/workflows/generate-readme.yml@v2
uses: Keyfactor/actions/.github/workflows/generate-readme.yml@ab#54101-node20-updates
secrets:
token: ${{ secrets.APPROVE_README_PUSH }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.token }}

- uses: Keyfactor/[email protected].3
- uses: Keyfactor/[email protected].4
with:
author_name: 'Keyfactor'
author_email: '[email protected]'
Expand Down

0 comments on commit a359e95

Please sign in to comment.