Skip to content

changelog update

changelog update #3

name: PublishReleaseAndModule
on:
push:
tags: [v*]
env:
buildFolderName: output
buildArtifactName: output
testResultFolderName: testResults
jobs:
build:
name: Build Module
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: 'Build and Package Module'
uses: ./.github/actions/build
test:
name: Test Module
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
needs:
- build
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: 'Test Module'
uses: ./.github/actions/test
with:
os: ${{ matrix.os }}
release-github:
name: Publish Release to GitHub
permissions:
contents: write
pull-requests: write
checks: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 2
- name: Configure Git Actor
run: |
# Configure git with github-actions bot to make commits more pretty
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Get changelog
id: get-changelog
uses: release-flow/[email protected]
with:
command: query
version: unreleased
- name: Create Release
uses: meeDamian/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ github.ref_name }}
draft: true
body: ${{ steps.get-changelog.outputs.release-notes }}
- name: Update Changelog
uses: thomaseizinger/keep-a-changelog-new-release@v1
with:
tag: ${{ github.ref_name }}
- name: Create Pull Request
id: create-pull-request
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "docs: update changelog for ${{ github.ref_name }}"
title: Update changelog for ${{ github.ref_name }}
body: Automatic update of changelog for release ${{ github.ref_name }}.
labels: documentation
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
branch: changelog-${{ github.ref_name }}
release-psgallery:
name: Publish to PowerShell Gallery
runs-on: ubuntu-latest
needs:
- build
- test
env:
GalleryApiToken: ${{ secrets.PSGALLERY_KEY }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Download Build Artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.buildArtifactName }}
path: ${{ env.buildFolderName }}
- name: Publish Release
shell: pwsh
run: Import-Module ./output/RequiredModules/PowerShellForGitHub; ./build.ps1 -tasks publish
env:
GitHubToken: ${{ secrets.GITHUB_TOKEN }}
GalleryApiToken: ${{ secrets.PSGALLERY_KEY }}