π release #63
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: π release | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Release module | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Update ubuntu runner | |
| uses: ./.github/actions/update-ubuntu-runner | |
| id: update-ubuntu-runner | |
| - name: Conventional Changelog Action | |
| id: changelog | |
| uses: TriPSs/conventional-changelog-action@v3 | |
| with: | |
| output-file: "false" | |
| skip-version-file: "false" | |
| skip-commit: "true" | |
| skip-git-pull: "true" | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| draft: false | |
| prerelease: false | |
| body: ${{ steps.changelog.outputs.clean_changelog }} | |
| tag_name: ${{ steps.changelog.outputs.tag }} | |
| name: Release ${{ steps.changelog.outputs.tag }} | |
| # - name: Create Release | |
| # uses: actions/create-release@v1 | |
| # if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # with: | |
| # tag_name: ${{ steps.changelog.outputs.tag }} | |
| # release_name: Release ${{ steps.changelog.outputs.tag }} | |
| # body: ${{ steps.changelog.outputs.clean_changelog }} | |
| # draft: false | |
| # prerelease: false | |
| - name: Release module to PSGallery | |
| shell: pwsh | |
| env: | |
| PSGALLERY_API_KEY: ${{ secrets.PAT }} | |
| run: | | |
| $version = "${{ steps.changelog.outputs.tag }}" -replace "v", "" | |
| $public = @(Get-ChildItem -Path (Join-Path -Path ".\AzureDevOpsPowerShell" -ChildPath 'Public\*.ps1') -Recurse -ErrorAction Stop) | |
| Update-ModuleManifest -Path ".\AzureDevOpsPowerShell\AzureDevOpsPowerShell.psd1" -ModuleVersion "$version" | |
| Update-ModuleManifest -Path ".\AzureDevOpsPowerShell\AzureDevOpsPowerShell.psd1" -FunctionsToExport $public.Basename | |
| Publish-Module -NuGetApiKey "$env:PSGALLERY_API_KEY" -Repository PSGallery -path ".\AzureDevOpsPowerShell" |