From d915a20c4ebdad7d4ffaff6c8abecd356834680f Mon Sep 17 00:00:00 2001 From: Florian Hopfner <33372796+FH-Inway@users.noreply.github.com> Date: Sat, 16 Mar 2024 13:44:20 +0000 Subject: [PATCH 1/3] Update path to tmpl-build-release.yml in build-manual.yml --- .github/workflows/build-manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-manual.yml b/.github/workflows/build-manual.yml index c9c09c9..264cee6 100644 --- a/.github/workflows/build-manual.yml +++ b/.github/workflows/build-manual.yml @@ -20,7 +20,7 @@ on: jobs: call-tmpl-build-release: - uses: ./.github/workflows/tmpl-build-release.yml + uses: fh-inway/d365.psmodule-alm/.github/workflows/tmpl-build-release.yml with: skippublish: ${{ inputs.skippublish }} skipghrelease: ${{ inputs.skipghrelease }} From a5b94dfb26ca41e841401b119e7eab56855904da Mon Sep 17 00:00:00 2001 From: Florian Hopfner <33372796+FH-Inway@users.noreply.github.com> Date: Sat, 16 Mar 2024 13:48:08 +0000 Subject: [PATCH 2/3] Add missing ref to reusable workflow reference --- .github/workflows/build-manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-manual.yml b/.github/workflows/build-manual.yml index 264cee6..25814be 100644 --- a/.github/workflows/build-manual.yml +++ b/.github/workflows/build-manual.yml @@ -20,7 +20,7 @@ on: jobs: call-tmpl-build-release: - uses: fh-inway/d365.psmodule-alm/.github/workflows/tmpl-build-release.yml + uses: fh-inway/d365.psmodule-alm/.github/workflows/tmpl-build-release.yml@main with: skippublish: ${{ inputs.skippublish }} skipghrelease: ${{ inputs.skipghrelease }} From 0fe0fd1c5d595cc2952b9321d888ccbdc70fb0de Mon Sep 17 00:00:00 2001 From: Florian Hopfner Date: Sat, 4 May 2024 13:56:49 +0200 Subject: [PATCH 3/3] update to newest version of resusable build / release workflow --- .github/workflows/build-manual.yml | 14 ++++-- .github/workflows/build.yml | 5 +- .github/workflows/tmpl-build-release.yml | 63 ------------------------ 3 files changed, 11 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/tmpl-build-release.yml diff --git a/.github/workflows/build-manual.yml b/.github/workflows/build-manual.yml index 25814be..ee8c38c 100644 --- a/.github/workflows/build-manual.yml +++ b/.github/workflows/build-manual.yml @@ -11,18 +11,22 @@ on: - $True skipghrelease: description: "Determines if creation of a GitHub release is skipped" - default: $False + default: false required: false - type: choice - options: - - $False - - $True + type: boolean + skipValidation: + description: "Determines if the module validation is skipped" + default: false + required: false + type: boolean jobs: call-tmpl-build-release: uses: fh-inway/d365.psmodule-alm/.github/workflows/tmpl-build-release.yml@main with: + module: 'd365bap.tools' skippublish: ${{ inputs.skippublish }} skipghrelease: ${{ inputs.skipghrelease }} + skipValidation: ${{ inputs.skipValidation }} secrets: apikey: ${{ secrets.ApiKey }} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b73477..05f6030 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,9 +6,8 @@ jobs: call-tmpl-build-release: - uses: ./.github/workflows/tmpl-build-release.yml + uses: fh-inway/d365.psmodule-alm/.github/workflows/tmpl-build-release.yml@main with: - skippublish: $False - skipghrelease: $False + module: 'd365bap.tools' secrets: apikey: ${{ secrets.ApiKey }} \ No newline at end of file diff --git a/.github/workflows/tmpl-build-release.yml b/.github/workflows/tmpl-build-release.yml deleted file mode 100644 index 336c18a..0000000 --- a/.github/workflows/tmpl-build-release.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Template for a reusable workflow to build and release a PowerShell module. -# The template expects the following PowerShell scripts in the build folder of the repository root -# that do the actual validated build and release: -# - vsts-prerequisities.ps1 -# - vsts-validate.ps1 -# - vsts-build.ps1 - -on: - workflow_call: - inputs: - autoversion: - description: "Determines if the module's build version number is automatically incremented" - default: $True - required: false - type: string - skippublish: - description: "Determines if the publishing to the PowerShell Gallery is skipped" - default: $False - required: false - type: string - skipghrelease: - description: "Determines if a GitHub release is created" - default: $False - required: false - type: string - secrets: - apikey: - description: "Key for the PowerShell Gallery API" - required: true - -jobs: - build-and-release: - - runs-on: windows-latest - - steps: - - uses: actions/checkout@v1 - - name: Install Prerequisites - run: .\build\vsts-prerequisites.ps1 - shell: powershell - - name: Validate - run: .\build\vsts-validate.ps1 - shell: powershell - - name: Build - run: .\build\vsts-build.ps1 -ApiKey ${{ secrets.apikey }} -AutoVersion:${{ inputs.autoversion }} -SkipPublish:${{ inputs.skippublish }} - shell: powershell - - - name: Get version - run: | - $publishDir = Get-Item -Path publish - [version]$version = (Import-PowerShellDataFile -Path "$($publishDir.FullName)\d365bap.tools\d365bap.tools.psd1").ModuleVersion - $githubReleaseVersion = "$($version.Major).$($version.Minor).$($version.Build)" - "VERSION=$githubReleaseVersion" >> $env:GITHUB_ENV - shell: powershell - - - name: Create GitHub release - uses: softprops/action-gh-release@v2 - with: - name: ${{ env.VERSION }} - tag_name: ${{ env.VERSION }} - draft: false - prerelease: true - generate_release_notes: true \ No newline at end of file