Skip to content

Publish

Publish #10

Workflow file for this run

name: Publish
on:
# Allow manually triggering of the workflow.
workflow_dispatch: {}
env:
MODULE_NAME: TableUI
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Publish module to PSGallery
shell: pwsh
run: |
Publish-Module -Name ".\$env:MODULE_NAME\$env:MODULE_NAME.psd1" -NuGetApiKey ${{ secrets.PS_GALLERY_KEY }}
tag:
env:
TAG_VERSION: Unspecified
needs: publish
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Detect version
shell: pwsh
run: |
Import-LocalizedData -BaseDirectory "./$($env:MODULE_NAME)/" -FileName "$($env:MODULE_NAME).psd1" -BindingVariable PSData
Write-Output "TAG_VERSION=$($PSData.ModuleVersion)" >> $env:GITHUB_ENV
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: "Version ${{ env.TAG_VERSION }}"
tag_name: ${{ env.TAG_VERSION }}
draft: true
#body_path: ${{ github.workspace }}-CHANGELOG.txt