Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding CICD #23

Merged
merged 43 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
5de167a
Adding workflow for GitHub pre-release
HarryHeres Oct 12, 2024
0755427
Updating CICD
HarryHeres Oct 12, 2024
2ce9c86
Renaming workflows folder
HarryHeres Oct 12, 2024
b8159a8
Updating CICD
HarryHeres Oct 12, 2024
8adadb5
Updating permissions on workflows
HarryHeres Oct 12, 2024
87efdb3
Updating permissions for workflow
HarryHeres Oct 12, 2024
3706b84
Updating CICD
HarryHeres Oct 12, 2024
3fd9cfe
Updating CICD
HarryHeres Oct 12, 2024
2ebbe43
Updating CICD
HarryHeres Oct 12, 2024
431669c
Updated CICD
HarryHeres Oct 12, 2024
6997f09
Updating CICD
HarryHeres Oct 12, 2024
4decfb9
Updating CICD
HarryHeres Oct 12, 2024
4ecf87d
Updating CICD
HarryHeres Oct 12, 2024
1927514
Updating CICD
HarryHeres Oct 12, 2024
8ecccde
Updated CICD
HarryHeres Oct 12, 2024
ae4eb51
Updated CICD
HarryHeres Oct 12, 2024
9638559
Updating CICD
HarryHeres Oct 12, 2024
e1d5d89
Updating CICD
HarryHeres Oct 12, 2024
319d198
Updating CICD
HarryHeres Oct 12, 2024
b62b319
Updating CICD
HarryHeres Oct 12, 2024
8497c3e
Updating CICD
HarryHeres Oct 12, 2024
e00d5ec
Updating CICD
HarryHeres Oct 12, 2024
429e8c4
Updating CICD
HarryHeres Oct 12, 2024
3e420cf
Updating CICD
HarryHeres Oct 12, 2024
6a38aef
Updating CICD
HarryHeres Oct 12, 2024
7a60905
Updating CICD
HarryHeres Oct 12, 2024
6ee6229
Updating CICD
HarryHeres Oct 12, 2024
dc6a040
Updating CICD
HarryHeres Oct 12, 2024
abd214b
Updating CICD
HarryHeres Oct 12, 2024
2ac5531
Updating CICD
HarryHeres Oct 12, 2024
f31a0b7
Updated CICD
HarryHeres Oct 12, 2024
eb3b340
Updating CICD
HarryHeres Oct 12, 2024
199128d
Updating CICD
HarryHeres Oct 12, 2024
8e0468a
Updating CICD
HarryHeres Oct 12, 2024
d55b067
Updating CICD
HarryHeres Oct 12, 2024
7ced4e3
Updating CICD
HarryHeres Oct 12, 2024
cc1677b
Updating CICD
HarryHeres Oct 12, 2024
42a45b9
Updated CMakeLists
HarryHeres Oct 12, 2024
628e4e0
Updating CICD
HarryHeres Oct 12, 2024
21fd2d3
Updating CICD
HarryHeres Oct 12, 2024
97f39f5
Updating CICD
HarryHeres Oct 12, 2024
0e2f224
Updating CICD
HarryHeres Oct 12, 2024
c340a0c
Updating CICD
HarryHeres Oct 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/create-pre-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Create and publish pre-release

on:
push:
branches:
- 'cicd'
workflow_dispatch:

jobs:
create-pre-release:
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Parse current version
id: get-app-version
run: echo "VERSION=$(cat SlicerBoneMorphing/SlicerBoneMorphing.py | grep Version | awk '{print $2}')" >> $GITHUB_OUTPUT

- name: Temporary CHANGELOG update
env:
VERSION: ${{steps.get-app-version.outputs.version}}
run: sed -i "s/\[Unreleased\]/\[${VERSION}\] - $(date +%Y-%m-%d)/" CHANGELOG.md

- name: Create ZIP archive
env:
VERSION: ${{steps.get-app-version.outputs.version}}
run: |
cd SlicerBoneMorphing
zip -r SlicerBoneMorphing-$VERSION.zip ./*
cp SlicerBoneMorphing-$VERSION.zip ../
cd ..

- name: Create pre-release
id: create-pre-release
uses: actions/create-release@v1
env:
VERSION: ${{ steps.get-app-version.outputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: v${{ env.VERSION }}
tag_name: v${{ env.VERSION }}
body_path: CHANGELOG.md
draft: false
prerelease: true

- name: Upload artifacts
uses: actions/upload-release-asset@v1
env:
VERSION: ${{ steps.get-app-version.outputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-pre-release.outputs.upload_url }}
asset_path: SlicerBoneMorphing-${{ env.VERSION }}.zip
asset_name: "SlicerBoneMorphing-${{ env.VERSION }}.zip"
asset_content_type: application/gzip
Loading
Loading