-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
517 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
# Release script run in Github CI | ||
|
||
BRANCH="$1" | ||
|
||
LAST_TAG=$(git tag | sort -t '.' --numeric-sort -k1,1 -k2,2 -k3,3 | tail -n 1) | ||
LAST_TAG_MAJOR=$(echo "$LAST_TAG" | cut -d'.' -f1) | ||
LAST_TAG_MINOR=$(echo "$LAST_TAG" | cut -d'.' -f2) | ||
LAST_TAG_PATCH=$(echo "$LAST_TAG" | cut -d'.' -f3) | ||
|
||
git show --compact-summary "$LAST_TAG..HEAD" > CHANGELOG | ||
|
||
TAG_MAJOR="" | ||
TAG_MINOR="" | ||
TAG_PATCH="" | ||
|
||
WARNINGS="" | ||
|
||
if grep -q "^ MAJOR" CHANGELOG; then | ||
TAG_MAJOR=$((LAST_TAG_MAJOR + 1)) | ||
TAG_MINOR="0" | ||
TAG_PATCH="0" | ||
elif grep -q "^ MINOR" CHANGELOG; then | ||
TAG_MAJOR=$((LAST_TAG_MAJOR + 0)) | ||
TAG_MINOR=$((LAST_TAG_MINOR + 1)) | ||
TAG_PATCH="0" | ||
elif grep -q "^ PATCH" CHANGELOG; then | ||
TAG_MAJOR=$((LAST_TAG_MAJOR + 0)) | ||
TAG_MINOR=$((LAST_TAG_MINOR + 0)) | ||
TAG_PATCH=$((LAST_TAG_PATCH + 1)) | ||
else | ||
WARNINGS="$WARNINGS ; This release is created with default bump version because no commits was ok" | ||
TAG_MAJOR=$((LAST_TAG_MAJOR + 0)) | ||
TAG_MINOR=$((LAST_TAG_MINOR + 0)) | ||
TAG_PATCH=$((LAST_TAG_PATCH + 1)) | ||
fi | ||
|
||
TAG="$TAG_MAJOR.$TAG_MINOR.$TAG_PATCH" | ||
|
||
gh release create "$TAG" \ | ||
--title "v$TAG" \ | ||
--generate-notes \ | ||
--target "$BRANCH" | ||
|
||
echo "release_tag=$TAG" >> $GITHUB_OUTPUT | ||
echo "$WARNINGS" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [main, dev] | ||
|
||
env: | ||
BRANCH: "main" | ||
DATE_TAG: "v3.0.1" | ||
|
||
jobs: | ||
release-create: | ||
permissions: write-all | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
release: ${{ steps.release.outputs.release_tag }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- id: release | ||
name: Create Release | ||
if: github.repository != 'EpitechPromo2026/B-CPP-500-TLS-5-1-rtype-xavier.mitault.git' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
if [[ "${{ github.ref }}" == 'refs/heads/main' ]]; then | ||
export GITHUB_OUTPUT=$GITHUB_OUTPUT | ||
bash ./.github/workflows/release.sh "${{ env.BRANCH }}" | ||
else | ||
echo "release_tag=0.0.0" >> $GITHUB_OUTPUT | ||
fi | ||
test-ecs: | ||
runs-on: ubuntu-latest | ||
needs: [release-linux] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Change directory | ||
run: cd test | ||
|
||
- name: Build test | ||
run: ./scripts/compil.sh | ||
|
||
release-linux: | ||
runs-on: ubuntu-latest | ||
needs: [release-create, date-to-tar] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cleanup | ||
run: ./scripts/cleanup.sh | ||
|
||
- name: Create tar | ||
run: ./scripts/create-tar.sh | ||
|
||
- name: Upload To Release | ||
if: github.ref == 'refs/heads/main' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload ${{ needs.release-create.outputs.release }} ./b-luga.tar | ||
- name: Upload To Artifact | ||
if: github.ref != 'refs/heads/main' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: b-luga.tar | ||
path: ./b-luga.tar | ||
|
||
date-to-tar: | ||
runs-on: ubuntu-latest | ||
needs: release-create | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install deps | ||
run: sudo apt-get update && sudo apt-get install -y tar git | ||
|
||
- name: Get Date | ||
run: | | ||
git clone https://github.com/HowardHinnant/date.git date-repo | ||
cd date-repo || exit 14 | ||
git checkout ${{ env.DATE_TAG }} | ||
cd .. | ||
- name: To Tar | ||
run: | | ||
tar -cvf date.tar date-repo | ||
- name: Upload To Release | ||
if: github.ref == 'refs/heads/main' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload ${{ needs.release-create.outputs.release }} ./date.tar | ||
- name: Upload To Artifact | ||
if: github.ref != 'refs/heads/main' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: date.tar | ||
path: ./date.tar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Test ECS | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
env: | ||
BRANCH: "main" | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
# Created by https://www.toptal.com/developers/gitignore/api/c++,c,clion,cmake | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=c++,c,clion,cmake | ||
|
||
### C ### | ||
# Prerequisites | ||
*.d | ||
|
||
# Object files | ||
*.o | ||
*.ko | ||
*.obj | ||
*.elf | ||
|
||
# Linker output | ||
*.ilk | ||
*.map | ||
*.exp | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Libraries | ||
*.lib | ||
*.a | ||
*.la | ||
*.lo | ||
|
||
# Shared objects (inc. Windows DLLs) | ||
*.dll | ||
*.so | ||
*.so.* | ||
*.dylib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
*.i*86 | ||
*.x86_64 | ||
*.hex | ||
|
||
# Debug files | ||
*.dSYM/ | ||
*.su | ||
*.idb | ||
*.pdb | ||
|
||
# Kernel Module Compile Results | ||
*.mod* | ||
*.cmd | ||
.tmp_versions/ | ||
modules.order | ||
Module.symvers | ||
Mkfile.old | ||
dkms.conf | ||
|
||
### C++ ### | ||
# Prerequisites | ||
|
||
# Compiled Object files | ||
*.slo | ||
|
||
# Precompiled Headers | ||
|
||
# Compiled Dynamic libraries | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
|
||
# Executables | ||
|
||
### CLion ### | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/**/usage.statistics.xml | ||
.idea/**/dictionaries | ||
.idea/**/shelf | ||
|
||
# AWS User-specific | ||
.idea/**/aws.xml | ||
|
||
# Generated files | ||
.idea/**/contentModel.xml | ||
|
||
# Sensitive or high-churn files | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
.idea/**/dbnavigator.xml | ||
|
||
# Gradle | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
|
||
# Gradle and Maven with auto-import | ||
# When using Gradle or Maven with auto-import, you should exclude module files, | ||
# since they will be recreated, and may cause churn. Uncomment if using | ||
# auto-import. | ||
# .idea/artifacts | ||
# .idea/compiler.xml | ||
# .idea/jarRepositories.xml | ||
# .idea/modules.xml | ||
# .idea/*.iml | ||
# .idea/modules | ||
# *.iml | ||
# *.ipr | ||
|
||
# CMake | ||
cmake-build-*/ | ||
|
||
# Mongo Explorer plugin | ||
.idea/**/mongoSettings.xml | ||
|
||
# File-based project format | ||
*.iws | ||
|
||
# IntelliJ | ||
out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Cursive Clojure plugin | ||
.idea/replstate.xml | ||
|
||
# SonarLint plugin | ||
.idea/sonarlint/ | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
# Editor-based Rest Client | ||
.idea/httpRequests | ||
|
||
# Android studio 3.1+ serialized cache file | ||
.idea/caches/build_file_checksums.ser | ||
|
||
### CLion Patch ### | ||
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 | ||
|
||
# *.iml | ||
# modules.xml | ||
# .idea/misc.xml | ||
# *.ipr | ||
|
||
# Sonarlint plugin | ||
# https://plugins.jetbrains.com/plugin/7973-sonarlint | ||
.idea/**/sonarlint/ | ||
|
||
# SonarQube Plugin | ||
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin | ||
.idea/**/sonarIssues.xml | ||
|
||
# Markdown Navigator plugin | ||
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced | ||
.idea/**/markdown-navigator.xml | ||
.idea/**/markdown-navigator-enh.xml | ||
.idea/**/markdown-navigator/ | ||
|
||
# Cache file creation bug | ||
# See https://youtrack.jetbrains.com/issue/JBR-2257 | ||
.idea/$CACHE_FILE$ | ||
|
||
# CodeStream plugin | ||
# https://plugins.jetbrains.com/plugin/12206-codestream | ||
.idea/codestream.xml | ||
|
||
# Azure Toolkit for IntelliJ plugin | ||
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij | ||
.idea/**/azureSettings.xml | ||
|
||
### CMake ### | ||
CMakeLists.txt.user | ||
CMakeCache.txt | ||
CMakeFiles | ||
CMakeScripts | ||
Testing | ||
Makefile | ||
cmake_install.cmake | ||
install_manifest.txt | ||
compile_commands.json | ||
CTestTestfile.cmake | ||
_deps | ||
|
||
### CMake Patch ### | ||
# External projects | ||
*-prefix/ | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/c++,c,clion,cmake | ||
|
||
build/* |
Oops, something went wrong.