Skip to content

Fix publishing for non-windows platforms#167

Merged
akoeplinger merged 4 commits intodotnet:mainfrom
radical:fix-publish-non-windows
Aug 11, 2022
Merged

Fix publishing for non-windows platforms#167
akoeplinger merged 4 commits intodotnet:mainfrom
radical:fix-publish-non-windows

Conversation

@radical
Copy link
Copy Markdown
Member

@radical radical commented Aug 11, 2022

In the PR #164 a new variable was added conditionally:

   # If post build signing, then OSX and Linux don't publish during their main pass. Otherwise, always publish
   - ${{ if eq(variables['PostBuildSign'], 'true') }}:
     - name: _NonWindowsInternalPublishArg
       value: -publish

.. but this resulted in the variable not getting defined at all in the final yaml.
We need to move the if to the variable value instead.

FYI @mmitche

In the commit mentioned at the end, a new variable was added
conditionally:

```yml
   # If post build signing, then OSX and Linux don't publish during their main pass. Otherwise, always publish
   - ${{ if eq(variables['PostBuildSign'], 'true') }}:
     - name: _NonWindowsInternalPublishArg
       value: -publish
```

.. but this resulted in the variable not getting defined at all in the
final yaml. I think the reason is that you can't define a variable based
on a the value of another variable, at yaml expansion time. So, access
the variable at run time.

```
commit b36ce43
Author: Matt Mitchell <mmitche@microsoft.com>
Date:   Fri Aug 5 14:05:37 2022 -0700

    Add support for in-build signing (dotnet#164)
```
@radical radical requested review from akoeplinger and mmitche August 11, 2022 11:11
@akoeplinger akoeplinger enabled auto-merge (squash) August 11, 2022 11:42
@akoeplinger akoeplinger merged commit 2160932 into dotnet:main Aug 11, 2022
@mmitche
Copy link
Copy Markdown
Member

mmitche commented Aug 11, 2022

Thanks!

@radical radical deleted the fix-publish-non-windows branch August 11, 2022 18:54
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

Successfully merging this pull request may close these issues.

3 participants