Skip to content

Commit

Permalink
add fetch tags
Browse files Browse the repository at this point in the history
  • Loading branch information
vkt1414 committed Nov 19, 2023
1 parent dabcb64 commit f472cce
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 28 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/cmake-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
timeout-minutes: 40

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-tags: true
fetch-tags: true
- uses: actions/setup-python@v4
with:
python-version: '3.7.14'
Expand All @@ -39,29 +39,29 @@ jobs:
run: |
cd docker && make dcmqi.test
# - name: "Publish docker image"
# # Only run if the event is not a pull request and the repository owner is QIICR.
# # The latter is to prevent forks from publishing packages even if the owner's token
# # would have sufficient privileges.
# if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
# run: |
# docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} && \
# docker push fedorov/dcmqi:`git describe --tags --exact-match 2> /dev/null || echo "latest"` \
#### || echo "skipping docker push"
- name: "Publish docker image"
# Only run if the event is not a pull request and the repository owner is QIICR.
# The latter is to prevent forks from publishing packages even if the owner's token
# would have sufficient privileges.
if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
run: |
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} && \
docker push fedorov/dcmqi:`git describe --tags --exact-match 2> /dev/null || echo "latest"` \
|| echo "skipping docker push"
- name: "Publish linux package"
# Only run if the event is not a pull request and the repository owner is QIICR.
# The latter is to prevent forks from publishing packages even if the owner's token
# would have sufficient privileges.
#if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
run: |
pip install -U "scikit-ci-addons>=0.22.0"
# python -m scikit-ci publish --package-name dcmqi --package-version `git
# describe --tags --exact-match 2> /dev/null || echo "latest"` --platform linux
# --commit-range ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} --repository ${{ github.event.pull_request.head.repo.full_name }} --token ${{ secrets.GITHUB_TOKEN }} --verbose
ci_addons publish_github_release vkt1414/dcmqi \
ci_addons publish_github_release QIICR/dcmqi \
--release-packages "build/dcmqi-build/dcmqi-*-linux.zip" \
--prerelease-packages "build/dcmqi-build/dcmqi-*-linux-*.tar.gz" \
--prerelease-packages-clear-pattern "dcmqi-*-linux-*" \
--prerelease-packages-keep-pattern "*<COMMIT_DATE>-<COMMIT_SHORT_SHA>*" \
--exit-success-if-missing-token --token ${{ secrets.PAT }}
--exit-success-if-missing-token --token ${{ secrets.GA_TOKEN }}
12 changes: 6 additions & 6 deletions .github/workflows/cmake-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:

# Checkout and install python
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-tags: true
fetch-tags: true
- uses: actions/setup-python@v4
with:
python-version: '3.7.14'
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
# Only run if the event is not a pull request and the repository owner is QIICR.
# The latter is to prevent forks from publishing packages even if the owner's token
# would have sufficient privileges.
#if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
run: |
cd ${{ github.workspace }}/dcmqi-build/dcmqi-build && ninja package
Expand All @@ -111,12 +111,12 @@ jobs:
# Only run if the event is not a pull request and the repository owner is QIICR.
# The latter is to prevent forks from publishing packages even if the owner's token
# would have sufficient privileges.
#if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
run: |
pip install -U "scikit-ci-addons>=0.22.0"
ci_addons publish_github_release vkt1414/dcmqi \
ci_addons publish_github_release QIICR/dcmqi \
--release-packages "${{ github.workspace }}/dcmqi-build/dcmqi-build/dcmqi-*-linux.tar.gz" \
--prerelease-packages ${{ github.workspace }}/dcmqi-build/dcmqi-build/dcmqi-*-mac-*.tar.gz \
--prerelease-packages-clear-pattern "dcmqi-*-mac-*" \
--prerelease-packages-keep-pattern "*<COMMIT_DATE>-<COMMIT_SHORT_SHA>*" \
--exit-success-if-missing-token --token ${{ secrets.PAT }}
--exit-success-if-missing-token --token ${{ secrets.GA_TOKEN }}
15 changes: 7 additions & 8 deletions .github/workflows/cmake-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-tags: true
fetch-tags: true
- uses: microsoft/setup-msbuild@v1.1
with:
vs-version: '17'
Expand Down Expand Up @@ -86,14 +86,14 @@ jobs:
# Only run if the event is not a pull request and the repository owner is QIICR.
# The latter is to prevent forks from publishing packages even if the owner's token
# would have sufficient privileges.
#if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}

needs: build-windows

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
fetch-tags: true
fetch-tags: true
- uses: actions/download-artifact@v3
with:
name: dcmqi-build
Expand All @@ -102,11 +102,10 @@ jobs:
- name: Publish package
run: |
pip install -U "scikit-ci-addons>=0.22.0"
git describe
ci_addons publish_github_release vkt1414/dcmqi `
ci_addons publish_github_release qiicr/dcmqi `
--exit-success-if-missing-token `
--release-packages "${{ github.workspace }}\dcmqi-build\dcmqi-build\dcmqi-*-win64.zip" `
--prerelease-packages "${{ github.workspace }}\dcmqi-build\dcmqi-build\dcmqi-*-win64-*.zip" `
--prerelease-packages-clear-pattern "dcmqi-*-win64-*" `
--prerelease-packages-keep-pattern "*<COMMIT_DATE>-<COMMIT_SHORT_SHA>*" `
--token ${{ secrets.PAT }}
--token ${{ secrets.GA_TOKEN }}

0 comments on commit f472cce

Please sign in to comment.