Skip to content

Commit f268801

Browse files
committed
Revert some changes in project-build\action.yaml
1 parent 68cdf64 commit f268801

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

.github/actions/project-build/action.yaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,16 @@ runs:
3838
# Generate semver compatible version from current tag and commit hash
3939
- name: Create version
4040
id: get-version
41-
run: echo "version=$(git describe --tags $(git rev-list --tags --max-count=1))+$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
41+
run: echo "version=$(git describe --tags `git rev-list --tags --max-count=1`)+$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
4242
shell: bash
4343

4444
- name: Check Prerelease
4545
id: check-prerelease
46-
run: |
47-
if [[ "${{ steps.get-version.outputs.version }}" == *"-"* ]]; then
48-
echo "is_prerelease=true" >> $GITHUB_OUTPUT
49-
else
50-
echo "is_prerelease=false" >> $GITHUB_OUTPUT
51-
fi
46+
run: "if ${{ contains(steps.get-version.outputs.version, '-') }}; then
47+
echo is_prerelease=true >> $GITHUB_OUTPUT;
48+
else
49+
echo is_prerelease=false >> $GITHUB_OUTPUT;
50+
fi"
5251
shell: bash
5352

5453
# Determine whether to include the --runtime flag.
@@ -99,16 +98,14 @@ runs:
9998

10099
# Push to GitHub packages on each commit and release (Nightly)
101100
- name: Push to NuGet (Nightly)
102-
run: |
103-
if [ "${{ inputs.nuget_push }}" = "true" ] && ( [ "${{ github.event_name }}" = "push" ] || ( [ "${{ github.event_name }}" = "create" ] && [ "${{ github.event.ref_type }}" = "tag" ] ) ); then
104-
dotnet nuget push ${{ inputs.project_path }}/bin/Release/*.nupkg --api-key ${{ inputs.github_token }} --skip-duplicate --source https://nuget.pkg.github.com/sunnamed434/index.json;
101+
run: if ${{ inputs.nuget_push == 'true' && (github.event_name == 'push' || (github.event_name == 'create' && github.event.ref_type == 'tag')) }}; then
102+
dotnet nuget push ${{ inputs.project_path }}/bin/Release/*.nupkg --api-key ${{ inputs.github_token }} --skip-duplicate --source https://nuget.pkg.github.com/sunnamed434/index.json;
105103
fi
106104
shell: bash
107105

108106
# Push to NuGet on each tag, but only if not a pre-release version (Release)
109107
- name: Push to NuGet (Release)
110-
run: |
111-
if [ "${{ inputs.nuget_push }}" = "true" ] && [ "${{ github.event_name }}" = "create" ] && [ "${{ github.event.ref_type }}" = "tag" ] && [ "${{ steps.check-prerelease.outputs.is_prerelease }}" = "false" ]; then
112-
dotnet nuget push ${{ inputs.project_path }}/bin/Release/*.nupkg --api-key ${{ inputs.nuget_key }} --skip-duplicate --source https://api.nuget.org/v3/index.json;
108+
run: if ${{ inputs.nuget_push == 'true' && github.event_name == 'create' && github.event.ref_type == 'tag' && steps.check-prerelease.outputs.is_prerelease == 'false' }}; then
109+
dotnet nuget push ${{ inputs.project_path }}/bin/Release/*.nupkg --api-key ${{ inputs.nuget_key }} --skip-duplicate --source https://api.nuget.org/v3/index.json;
113110
fi
114111
shell: bash

.github/workflows/BitMono.GlobalTool.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ jobs:
3939
github_token: ${{ secrets.PAT }}
4040
nuget_key: ${{ secrets.NUGET_DEPLOY_KEY }}
4141
nuget_push: true
42-
use_runtime: false # Because this is a dotnet tool.
42+
use_runtime: false # Because this is a dotnet tool.
43+

0 commit comments

Comments
 (0)