Skip to content

Remove-FabricWarehouse fix (#80) #28

Remove-FabricWarehouse fix (#80)

Remove-FabricWarehouse fix (#80) #28

on:
push:
branches:
- develop
paths-ignore:
- CHANGELOG.md
- .vscode/**
- .github/**
- images/**
- tests/**
- '**.md'
- '**.yml'
tags:
- '**'
- '!*preview*'
env:
buildFolderName: output
buildArtifactName: output
testResultFolderName: testResults
name: Deploy Preview Module
permissions:
contents: write # to create a release
id-token: write # to use the GitHub OIDC token for authentication
packages: write # to publish the module to the PowerShell Gallery
pull-requests: write # to create a pull request for the changelog
issues: write # to create an issue for the changelog
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
# This workflow is triggered on push to the develop branch and deploys the module to the PowerShell Gallery as a preview version.
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 correct branch name
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: 5.x
- name: Evaluate Next Version
uses: gittools/actions/gitversion/[email protected]
with:
configFilePath: GitVersion.yml
- name: Build & Package Module
shell: pwsh
run: ./build.ps1 -ResolveDependency -tasks pack
env:
ModuleVersion: ${{ env.gitVersion.NuGetVersionV2 }}
- 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/develop' || startsWith(github.ref, 'refs/tags/')) }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }} # checkout the correct branch name
fetch-depth: 0
- 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 }}
ReleaseBranch: develop
MainGitBranch: develop