Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/deploy-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
with:
ref: ${{ github.head_ref }} # checkout the correct branch name
fetch-depth: 0
token: ${{ secrets.REPO_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.15
with:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
with:
ref: ${{ github.head_ref }} # checkout the correct branch name
fetch-depth: 0
token: ${{ secrets.REPO_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -83,8 +83,8 @@ jobs:
- name: Merge main -> develop
# This step merges the main branch into the develop branch after a successful deployment. This ensures that the develop branch includes the tag for the latest release.
run: |
git config --local user.email "jpomfret7@gmail.com"
git config --local user.name "Automated Jess Did this"
git config --local user.email "bot@github.com"
git config --local user.name "GitHub Bot"
git checkout main
git pull
git checkout develop
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/publish-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
on:
push:
branches:
- main
paths-ignore:
- CHANGELOG.md
- .vscode/**
- .github/**
- images/**
- tests/**
- '**.md'
- '**.yml'
tags:
- '*'
env:
buildFolderName: output
buildArtifactName: output

permissions:
actions: write # to allow the workflow to run actions
checks: write # to allow the workflow to create checks
statuses: write # to allow the workflow to create statuses

name: Deploy Module (only)
# This workflow is triggered on push to the main branch and deploys the module to the PowerShell Gallery and creates a GitHub Release.
jobs:
Build_Stage_Package_Module:
name: Package Module
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # checkout the triggered ref (branch or tag)
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Package Module
shell: pwsh
run: ./build.ps1 -ResolveDependency -tasks pack
- name: Publish Build Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.buildArtifactName }}
path: ${{ env.buildFolderName }}/

Deploy_Stage_Deploy_Module:
name: Deploy Module
runs-on: ubuntu-latest
needs:
- Build_Stage_Package_Module
if: ${{ success() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # checkout the triggered ref (branch or tag)
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download Build Artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.buildArtifactName }}
path: ${{ env.buildFolderName }}
- name: Publish Release
shell: pwsh
run: ./build.ps1 -tasks publish
env:
GitHubToken: ${{ secrets.GitHubToken }}
GalleryApiToken: ${{ secrets.GalleryApiToken }}
2 changes: 1 addition & 1 deletion source/FabricTools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'FabricTools.psm1'

# Version number of this module.
ModuleVersion = '0.0.1'
ModuleVersion = '0.31.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
Loading