Update crowdin.yml #24
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Module | |
| on: | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install and cache PowerShell modules | |
| id: psmodulecache | |
| uses: potatoqualitee/[email protected] | |
| with: | |
| modules-to-cache: BuildHelpers, PowerShellBuild, psake, PSScriptAnalyzer, platyPS | |
| - shell: pwsh | |
| # Give an id to the step, so we can reference it later | |
| id: check_if_versions_bumped | |
| run: | | |
| [version]$GalleryVersion = Get-NextNugetPackageVersion -Name Plaster -ErrorAction Stop | |
| [version]$GithubVersion = Get-MetaData -Path ./Plaster/Plaster.psd1 -PropertyName ModuleVersion -ErrorAction Stop | |
| $bumped = $GithubVersion -ge $GalleryVersion | |
| # Set the output named "version_bumped" | |
| Write-Host "::set-output name=version_bumped::$bumped" | |
| # Only publish (from master) if versions | |
| - name: Build and publish | |
| if: steps.check_if_versions_bumped.outputs.version_bumped == 'True' | |
| env: | |
| PSGALLERY_API_KEY: ${{ secrets.GALLERY_KEY }} | |
| shell: pwsh | |
| run: | | |
| ./build.ps1 -Task Publish |