2chevskii / optional

Provides utility type Option<T> for optional value handling
MIT License
0 stars 0 forks source link

Add package listing url to push artifacts job #1

Open 2chevskii opened 3 months ago

2chevskii commented 3 months ago

Description

It would be convenient to see the deployed package url leading to nuget/github page with specific package version next to successful action run, which has deployed the said package, e.g. https://www.nuget.org/packages/Dvchevskii.Optional/1.1.0

Similar behavior to one used by the github pages deployment

Possible implementation

Add outputs to push-nuget job of the push-release-artifacts workflow, utilising environments Set those outputs in the nuke build target

2chevskii commented 3 months ago

This SO page can be used as reference on how to configure github outputs to show as urls

https://stackoverflow.com/questions/67385568/github-actions-how-to-dynamically-set-environment-url-based-on-deployment-step

2chevskii commented 3 months ago

ChatGPT generated example

name: NuGet Package Deployment

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      # Build and pack NuGet package

      - name: Push NuGet package
        run: |
          # Your commands to push NuGet package to feed here

          # For demonstration, assuming you have the deployment URL in a variable called DEPLOYMENT_URL
          DEPLOYMENT_URL="https://your-nuget-feed-url"

          # Set the deployment URL as an output variable
          echo "::set-output name=deployment_url::$DEPLOYMENT_URL"

    outputs:
      deployment_url: ${{ steps.push.outputs.deployment_url }}