Skip to content

Commit b961406

Browse files
committed
CI updates
1 parent 0374298 commit b961406

File tree

1 file changed

+2
-51
lines changed

1 file changed

+2
-51
lines changed

.github/workflows/ci-publish.yml

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Publish
22

33
on:
4-
schedule:
5-
- cron: '40 9 * * *'
6-
workflow_dispatch:
74
release:
85
types: [published]
96
inputs:
@@ -12,37 +9,8 @@ on:
129
required: true
1310
default: 'false'
1411

15-
jobs:
16-
activity-short-circuit:
17-
runs-on: ubuntu-latest
18-
outputs:
19-
same_sha: ${{ steps.check.outputs.same_sha }}
20-
steps:
21-
- uses: actions/checkout@v4
22-
with:
23-
fetch-depth: 0
24-
25-
- name: Get Activity Short Circuit
26-
id: check
27-
run: |
28-
echo "Event name: ${{ github.event_name }}"
29-
git branch -a
30-
git fetch origin nightly:nightly
31-
head_sha=$(git rev-parse --verify HEAD)
32-
nightly_sha=$(git rev-parse --verify nightly)
33-
if [[ "$head_sha" == "$nightly_sha" && ${{ github.event_name }} != "release" ]]; then
34-
same_sha=true;
35-
else
36-
same_sha=false;
37-
fi
38-
echo "head_sha=$head_sha"
39-
echo "nightly_sha=$nightly_sha"
40-
echo "same_sha=${same_sha}"
41-
echo "same_sha=${same_sha}" >> $GITHUB_OUTPUT
42-
12+
jobs:
4313
build-test:
44-
needs: activity-short-circuit
45-
if: needs.activity-short-circuit.outputs.same_sha == 'false'
4614
runs-on: ${{ matrix.os }}
4715

4816
strategy:
@@ -123,21 +91,4 @@ jobs:
12391
file: MutagenGenerationTools.zip
12492
repo_token: ${{ secrets.GITHUB_TOKEN }}
12593
tag: ${{ github.event.release.tag_name }}
126-
- name: Publish to Nuget.org
127-
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --no-symbols
128-
129-
update-nightly:
130-
needs: [build-test-push, activity-short-circuit]
131-
if: needs.activity-short-circuit.outputs.same_sha == 'false'
132-
runs-on: ubuntu-latest
133-
steps:
134-
- uses: actions/checkout@v4
135-
with:
136-
fetch-depth: 0
137-
- name: Reset nightly to release
138-
run: |
139-
head_sha=$(git rev-parse --verify HEAD)
140-
echo "head_sha=$head_sha"
141-
git checkout nightly
142-
git reset --hard $head_sha
143-
git push
94+

0 commit comments

Comments
 (0)