Giter Club home page Giter Club logo

publish-powershell-action's People

Contributors

allcontributors[bot] avatar dependabot[bot] avatar galvill avatar natescherer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

publish-powershell-action's Issues

Handle errors when publishing to NuGet

When publishing to NuGet, If the process encounters an error, it should handle it gracefully and perform cleanup if needed.
I am working to implement this and will create a pull request when ready.

Logic bug checking PowerShellGet version?

Hey there. Was just perusing the code and spotted what looks like a potential logic goof in this section.

https://github.com/natescherer/publish-powershell-action/blob/2808e8d968cb03e54d30f0a06a72ee2849b7d372/src/steps/2_prepare.ps1#L6C1-L15C2

If the idea is to ensure the existing module version is at least 2.2.5, shouldn't the operator be -lt rather than -ge or flip the corresponding blocks around?

I'm also curious if you need the -ListAvailable switch in the Get-Module call like you have further down when checking for PSResourceGet. Or do you not because it's already pre-imported by the action?

Re-Enable Module Manifest Validation for Modules with Dependecies

As discovered in #10, module manifest validation fails if a module has dependencies, and they aren't installed on the local machine (pretty much always going to be true for the Actions runners that this action will be running on).

As a result, I've disabled module manifest validation when the RequiredModules section of a manifest isn't null. According to PowerShell/PSResourceGet#903, this is planned to be fixed in the future version of PSResourceGet, so I'm adding this as a reminder to re-enable this in the future once PSRG is updated.

My module has dependencies. Action fails...

image

F7History.psd1 includes:

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @('Microsoft.PowerShell.ConsoleGuiTools', 'PSReadLine')

When I publish locally with

publish-Module -Path .\F7History\ -NuGetApiKey <key>

It works fine. What am i doing wrong?

name: Publish to PowerShell Gallery

on:
  push:
    branches:
      - main

jobs:
  publish:
    runs-on: ubuntu-latest
    # steps:
    #   - name: Check out code
    #     uses: actions/checkout@v2

    steps:
      - name: Check out code
        uses: actions/checkout@v2
      - name: Publish PowerShell
        uses: natescherer/[email protected]
        with:
          token: ${{ secrets.F7HISTORY_GALLERY_KEY }}
          target: gallery
          path: src

Handle same name registration in PSResourceRepository

It happened for self hosted runner sometimes, that "Nuget" already registered in PSResourceRepository when trying to publish.

I want to contribute following code and seems I don't have permission to push a new branch.

if ($null -ne (Get-PSResourceRepository -Name "NuGet" -ErrorAction SilentlyContinue)) {
    Write-Host "Unregistering existing NuGet repository..."
    Unregister-PSResourceRepository -Name "NuGet"
} 


Write-Host "Registering NuGet repository..."
Register-PSResourceRepository -Name "NuGet" -Uri $env:INPUT_NUGETURL -Trusted

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.