mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
accessing environmental vars correctly in pwsh in release-build
This commit is contained in:
parent
ba92897b2e
commit
733f20b46b
20
.github/workflows/release-build.yml
vendored
20
.github/workflows/release-build.yml
vendored
@ -24,9 +24,9 @@ jobs:
|
|||||||
# Replace Version in files
|
# Replace Version in files
|
||||||
- run: |
|
- run: |
|
||||||
choco install sed make -y
|
choco install sed make -y
|
||||||
sed -i "s/%{{SPOTUBE_VERSION}}%/$RELEASE_VERSION/" windows/runner/Runner.rc
|
sed -i "s/%{{SPOTUBE_VERSION}}%/$env:RELEASE_VERSION/" windows/runner/Runner.rc
|
||||||
sed -i "s/%{{SPOTUBE_VERSION}}%/$RELEASE_VERSION/" choco-struct/tools/VERIFICATION.txt
|
sed -i "s/%{{SPOTUBE_VERSION}}%/$env:RELEASE_VERSION/" choco-struct/tools/VERIFICATION.txt
|
||||||
sed -i "s/%{{SPOTUBE_VERSION}}%/$RELEASE_VERSION/" choco-struct/spotube.nuspec
|
sed -i "s/%{{SPOTUBE_VERSION}}%/$env:RELEASE_VERSION/" choco-struct/spotube.nuspec
|
||||||
|
|
||||||
# Build Windows Executable
|
# Build Windows Executable
|
||||||
- uses: subosito/flutter-action@v2.2.0
|
- uses: subosito/flutter-action@v2.2.0
|
||||||
@ -43,31 +43,31 @@ jobs:
|
|||||||
# Create Chocolatey Package
|
# Create Chocolatey Package
|
||||||
# setting the sha256 hash for new bundle
|
# setting the sha256 hash for new bundle
|
||||||
- run: |
|
- run: |
|
||||||
Set-Variable -Name HASH -Value (Get-FileHash dist\$RELEASE_VERSION\spotube-$RELEASE_VERSION-windows.exe).Hash
|
Set-Variable -Name HASH -Value (Get-FileHash dist\$env:RELEASE_VERSION\spotube-$env:RELEASE_VERSION-windows.exe).Hash
|
||||||
sed -i "s/%{{WIN_SHA256}}%/$HASH/" choco-struct/tools/VERIFICATION.txt
|
sed -i "s/%{{WIN_SHA256}}%/$HASH/" choco-struct/tools/VERIFICATION.txt
|
||||||
make VERSION=$RELEASE_VERSION choco
|
make VERSION=$env:RELEASE_VERSION choco
|
||||||
|
|
||||||
# Rename the artifacts
|
# Rename the artifacts
|
||||||
- run: |
|
- run: |
|
||||||
Rename-Item -Path dist/$RELEASE_VERSION/spotube.$RELEASE_VERSION.nupkg -NewName Spotube-windows-x86_64.nupkg
|
Rename-Item -Path dist/$env:RELEASE_VERSION/spotube.$env:RELEASE_VERSION.nupkg -NewName Spotube-windows-x86_64.nupkg
|
||||||
Rename-Item -Path dist/$RELEASE_VERSION/spotube-$RELEASE_VERSION-windows.exe Spotube-windows-x86_64-setup.exe
|
Rename-Item -Path dist/$env:RELEASE_VERSION/spotube-$env:RELEASE_VERSION-windows.exe Spotube-windows-x86_64-setup.exe
|
||||||
|
|
||||||
# Upload release binary
|
# Upload release binary
|
||||||
- uses: meeDamian/github-release@2.0
|
- uses: meeDamian/github-release@2.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag: ${{ github.event.release.tag_name }}
|
tag: ${{ github.event.release.tag_name }}
|
||||||
files: dist/$RELEASE_VERSION
|
files: dist/${{ env.RELEASE_VERSION }}
|
||||||
|
|
||||||
# Publish to Chocolatey Repository
|
# Publish to Chocolatey Repository
|
||||||
- run: |
|
- run: |
|
||||||
choco apikey -k ${{ secrets.CHOCO_API_KEY }} -s https://push.chocolatey.org/
|
choco apikey -k ${{ secrets.CHOCO_API_KEY }} -s https://push.chocolatey.org/
|
||||||
echo 'published to community.chocolatey.org'
|
echo 'published to community.chocolatey.org'
|
||||||
|
|
||||||
# choco push dist/$RELEASE_VERSION/spotube.$RELEASE_VERSION.nupkg
|
# choco push dist/$env:RELEASE_VERSION/Spotube-windows-x86_64.nupkg
|
||||||
|
|
||||||
# Upload artifacts
|
# Upload artifacts
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Spotube-Windows-Bundle
|
name: Spotube-Windows-Bundle
|
||||||
path: dist/$RELEASE_VERSION
|
path: dist/${{ env.RELEASE_VERSION }}
|
||||||
|
Loading…
Reference in New Issue
Block a user