Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuGet vs Choco package version mismatch? #156

Open
rcmaehl opened this issue Jun 28, 2023 · 0 comments
Open

NuGet vs Choco package version mismatch? #156

rcmaehl opened this issue Jun 28, 2023 · 0 comments

Comments

@rcmaehl
Copy link

rcmaehl commented Jun 28, 2023

Behaviour

Steps to reproduce this issue

  1. Pack Software
  2. Push Software

Expected behaviour

Software packed succesfully

Actual behaviour

Despite version being 0.7.4.0, package gets packed as 0.7.4 causing a file not found error later in the process

image

Configuration

name: Chocolatey Deploy

on:
  release:
    types: [published]
  workflow_dispatch:

defaults:
  run:
    shell: bash

jobs:
  chocolatey:
    name: Deploy
    runs-on: windows-latest
    if: github.repository == 'rcmaehl/MSEdgeRedirect'
    steps:
      - name: Clone Repository
        uses: actions/checkout@v3
      - uses: oprypin/find-latest-tag@v1
        with:
          repository: rcmaehl/MSEdgeRedirect  # The repository to scan.
          releases-only: true  # We know that all relevant tags have a GitHub release for them.
        id: latesttag
      - name: Set Checksum
        run: |
          filename="MSEdgeRedirect.exe"
          url="https://github.com/${{ github.repository }}/releases/download/${{ steps.latesttag.outputs.tag }}/${filename}"
          sed -i "s#{URL64}#${url}#g" "Assets/Choco/MSEdgeRedirect/tools/chocolateyinstall.ps1"
          curl -sSL "${url}" -o "Assets/Choco/${filename}"
          sha256=$(cat "Assets/Choco/${filename}" | sha256sum -)
          sed -i "s/{SHA256CHECKSUM64}/${sha256:0:64}/g" "Assets/Choco/MSEdgeRedirect/tools/chocolateyinstall.ps1"
      - name: Set Version
        id: version
        run: |
          version=${{ steps.latesttag.outputs.tag }}
          echo "::set-output name=nuget::$version"
          sed -i "s/{VERSION}/${version}/g" "Assets/Choco/MSEdgeRedirect/msedgeredirect.nuspec"
      - name: Pack Release
        uses: crazy-max/ghaction-chocolatey@v2.2.0
        with:
          args: pack Assets/Choco/MSEdgeRedirect/msedgeredirect.nuspec --outputdirectory Assets/Choco/MSEdgeRedirect
      - name: Upload Release
        uses: crazy-max/ghaction-chocolatey@v2.2.0
        with:
          args: push Assets/Choco/MSEdgeRedirect/msedgeredirect.${{ steps.version.outputs.nuget }}.nupkg -s https://push.chocolatey.org/ -k ${{ secrets.CHOCO_KEY }}

Logs

logs_760.zip

@rcmaehl rcmaehl changed the title NuGet vs Choco package version mismatch NuGet vs Choco package version mismatch? Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant