Skip to content

Commit

Permalink
Merge pull request #3 from 345paul/fix/choco-license
Browse files Browse the repository at this point in the history
Added CI step to create license and verification files for Chocolatey
  • Loading branch information
ValRobb authored Oct 26, 2020
2 parents 0adabb0 + 533187e commit 854ece6
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ jobs:
echo ::set-env name=VERSION_NUMBER_SEM1::$(cat ./version-number.txt)${{ env.VERSION_NUMBER_SUFFIX_SEM1 }}
echo ::set-env name=VERSION_NUMBER_SEM2::$(cat ./version-number.txt)${{ env.VERSION_NUMBER_SUFFIX_SEM2 }}
- name: Update the nuget config with the build credentials for the private source
run: dotnet nuget update source ${{ env.NUGET_SOURCE_NAME }} --username ${{ secrets.NUGET_PACKAGE_REPO_API_USER }} --password ${{ secrets.NUGET_PACKAGE_REPO_API_SECRET }}
- name: Update the nuget config with the credentials for the GitHub Package Repository
run: dotnet nuget update source ${{ env.NUGET_SOURCE_NAME }} --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}

- name: Update the Chocolatey dependencies for scheduled builds
if: github.event_name == 'schedule'
Expand Down Expand Up @@ -120,6 +120,19 @@ jobs:
- name: Publish the plugin library and dependency files for Chocolatey
run: dotnet publish ${{ env.PLUGIN_PROJECT_FILE }} -r win-x64 -o ./${{ env.OUTPUT_DIR }}/${{ env.CHOCO_SRC_DIR }} --configuration ${{ env.BUILD_TYPE }} -p:Version=${{ env.VERSION_NUMBER_SEM2 }} -p:TargetFramework=netcoreapp3.1 --self-contained true

- name: Create the Chocolatey verification file and copy the license file
shell: bash
run: |
cp ./LICENSE ./${{ env.OUTPUT_DIR }}/${{ env.CHOCO_SRC_DIR }}/LICENSE
verificationFile=./${{ env.OUTPUT_DIR }}/${{ env.CHOCO_SRC_DIR }}/VERIFICATION
touch $verificationFile
find ${{ env.OUTPUT_DIR }}/${{ env.CHOCO_SRC_DIR }} -type f |
while read f
do
filename="$basename -- $f"
echo $filename >> $verificationFile
done
- name: Create the Chocolatey package output directory
shell: bash
run: |
Expand Down

0 comments on commit 854ece6

Please sign in to comment.