Skip to content

Merge pull request #1152 from HydrologicEngineeringCenter/1151-not-en… #36

Merge pull request #1152 from HydrologicEngineeringCenter/1151-not-en…

Merge pull request #1152 from HydrologicEngineeringCenter/1151-not-en… #36

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
env:
Project_Name: HEC.FDA.View/HEC.FDA.View.csproj
jobs:
Build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/checkout@v3
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: '8.0.x'
- name: Add Github and Nexus Source
run: |
dotnet nuget add source --username HydrologicEngineeringCenter --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/HydrologicEngineeringCenter/index.json"
dotnet nuget add source --name fda-nuget "https://www.hec.usace.army.mil/nexus/repository/fda-nuget/"
dotnet nuget add source --name dss "https://www.hec.usace.army.mil/nexus/repository/dss/"
- name: Create version number
shell: pwsh
run: |
$TAG = $env:GITHUB_REF -replace 'refs/tags/', ''
$VERSION = $TAG -replace '^v', ''
echo "VERSION=$VERSION" >> $env:GITHUB_ENV
- name: Publish
shell: pwsh
run: |
$PUBLISH_OUT = "${pwd}/TO-PACKAGE/"
echo "PUBLISH_OUT=$PUBLISH_OUT" >> $env:GITHUB_ENV
dotnet publish -c Release -v quiet /p:Version=${{ env.VERSION }} -o $PUBLISH_OUT ${{ env.PROJECT_NAME }}
- name: Create 7z SFX (self-extracting) archive
shell: pwsh
run: |
$7Z_OUT = "${pwd}/HEC-FDA-${{ env.VERSION }}.exe"
echo "7Z_OUT=$7Z_OUT" >> $env:GITHUB_ENV
7z a -sfx $7Z_OUT "${{ env.PUBLISH_OUT }}/*"
- name: Release
uses: softprops/action-gh-release@v2
with:
files: ${{ env.7Z_OUT }}

Check failure on line 57 in .github/workflows/Release.yml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/Release.yml (Line: 57, Col: 18): Unexpected symbol: '7Z_OUT'. Located at position 5 within expression: env.7Z_OUT