Skip to content

Commit 35f67b3

Browse files
Merge pull request #16 from apeer-micro/feature/fix_action
fix action
2 parents 3404a05 + a5cb2d0 commit 35f67b3

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
# Dry-run triggers
55
pull_request:
66
branches:
7-
- main
7+
- master
88
workflow_dispatch:
99
# Publish trigger: only when the PR merge commits are pushed to main
1010
push:
1111
branches:
12-
- main
12+
- master
1313

1414
permissions:
1515
contents: read # for checkout
@@ -21,8 +21,8 @@ jobs:
2121
name: Dry-Run Build & Check
2222
runs-on: ubuntu-latest
2323

24-
# Only on PRs or manual; skip on 'push to main'
25-
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
24+
# Allow dry-run on all events except when pushing to master
25+
if: github.event_name != 'push' || github.ref != 'refs/heads/master'
2626
steps:
2727
- name: Check out code
2828
uses: actions/checkout@v4
@@ -43,7 +43,7 @@ jobs:
4343
run: python -m twine check dist/*
4444

4545
- name: Upload build artifacts
46-
uses: actions/upload-artifact@v3
46+
uses: actions/upload-artifact@v4
4747
with:
4848
name: built-package
4949
path: dist/*
@@ -53,8 +53,8 @@ jobs:
5353
runs-on: ubuntu-latest
5454
needs: dry-run
5555

56-
# Only fire on the push-to-main that completes the PR
57-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
56+
# Only fire on the push-to-master that completes the PR
57+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
5858
steps:
5959
- name: Check out code
6060
uses: actions/checkout@v4

0 commit comments

Comments
 (0)