-
Notifications
You must be signed in to change notification settings - Fork 5
59 lines (52 loc) · 2.12 KB
/
Release.yaml
File metadata and controls
59 lines (52 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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"