0.7.5.0 - Grounding CoPilot #32
Workflow file for this run
This file contains 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: 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 "nuget=$version" >> $GITHUB_OUTPUT | |
sed -i "s/{VERSION}/${version}/g" "Assets/Choco/MSEdgeRedirect/msedgeredirect.nuspec" | |
- name: Choco Downgrade | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: install chocolatey --version=1.2.1 --allow-downgrade -y -r --no-progress | |
- name: Pack Release | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: pack Assets/Choco/MSEdgeRedirect/msedgeredirect.nuspec --outputdirectory Assets/Choco/MSEdgeRedirect | |
- name: Choco Upgrade | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: upgrade chocolatey | |
- name: Upload Release | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: push Assets/Choco/MSEdgeRedirect/msedgeredirect.${{ steps.version.outputs.nuget }}.nupkg -s https://push.chocolatey.org/ -k ${{ secrets.CHOCO_KEY }} |