-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from B-urb/development
Development
- Loading branch information
Showing
13 changed files
with
637 additions
and
186 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,37 @@ | ||
# Ignore git and version control | ||
.git | ||
.gitignore | ||
.svn | ||
.cvsignore | ||
|
||
# Ignore build and log files | ||
build/ | ||
logs/ | ||
tmp/ | ||
|
||
# Ignore testing and benchmarking artifacts | ||
tests/ | ||
benchmarks/ | ||
|
||
# Ignore Dockerfile and .dockerignore to reduce context size | ||
Dockerfile | ||
.dockerignore | ||
|
||
# Ignore dependency directories (language and framework-specific) | ||
node_modules/ | ||
vendor/ | ||
.env | ||
|
||
# Ignore IDE and editor directories | ||
.idea/ | ||
*.swp | ||
*.swo | ||
.vscode/ | ||
|
||
# Ignore user-specific files | ||
.DS_Store | ||
*.log | ||
|
||
# Ignore sensitive files | ||
secrets.yml | ||
config/credentials.yml.enc |
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,94 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- development | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
env: | ||
CI: true | ||
|
||
permissions: | ||
contents: read | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
include: | ||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
- os: macos-latest | ||
target: x86_64-apple-darwin | ||
- os: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.target }} | ||
profile: minimal | ||
override: true | ||
- name: Build | ||
run: cargo build --release --target ${{ matrix.target }} | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: doclytics-${{ env.BRANCH_NAME }}-${{ matrix.os }} | ||
path: | | ||
./target/${{ matrix.target }}/release/doclytics${{ matrix.os == 'windows-latest' && '.exe' || '' }} | ||
build-docker: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Build | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/doclytics:${{ env.BRANCH_NAME }} | ||
platforms: linux/amd64,linux/arm64 | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
if: ${{ github.ref }} == 'master' || ${{ github.ref }} == 'development' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Install dependencies | ||
run: npm install -g semantic-release @saithodev/semantic-release-backmerge @semantic-release/github @semantic-release/exec | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
run: npx semantic-release --debug |
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,86 @@ | ||
name: Deploy Release | ||
on: | ||
push: | ||
branches: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
env: | ||
CI: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
include: | ||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
- os: macos-latest | ||
target: x86_64-apple-darwin | ||
- os: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.target }} | ||
profile: minimal | ||
override: true | ||
- name: Build | ||
run: cargo build --release --target ${{ matrix.target }} | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: doclytics-${{ env.BRANCH_NAME }}-${{ matrix.os }} | ||
path: | | ||
./target/${{ matrix.target }}/release/doclytics${{ matrix.os == 'windows-latest' && '.exe' || '' }} | ||
- name: Get Release Upload URL | ||
id: get_upload_url | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
shell: bash | ||
run: | | ||
upload_url=$(curl -H "Authorization: token $GITHUB_TOKEN" \ | ||
https://api.github.com/repos/${{ github.repository }}/releases/tags/${BRANCH_NAME} \ | ||
| jq -r '.upload_url' | sed 's/{?name,label}//') | ||
echo "UPLOAD_URL=${upload_url}" >> $GITHUB_OUTPUT | ||
- name: Upload Asset | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
ASSET_PATH: ./target/${{ matrix.target }}/release/doclytics${{ matrix.os == 'windows-latest' && '.exe' || '' }} | ||
ASSET_NAME: doclytics-${{ env.BRANCH_NAME }}-${{ matrix.os }} | ||
UPLOAD_URL: ${{ steps.get_upload_url.outputs.UPLOAD_URL }} | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
run: | | ||
curl -X POST -H "Authorization: token $GITHUB_TOKEN" -H "Content-Type: application/zip" --data-binary @$ASSET_PATH "${UPLOAD_URL}?name=${ASSET_NAME}&label=${ASSET_NAME}" | ||
build-docker: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: ${{ github.ref }} != 'master' && ${{ github.ref }} != 'development' | ||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Build | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/doclytics:${{ env.BRANCH_NAME }} | ||
platforms: linux/amd64,linux/arm64 | ||
|
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,68 @@ | ||
name: Deploy Release | ||
on: | ||
push: | ||
branches: | ||
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+' | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+' | ||
env: | ||
CI: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
include: | ||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
- os: macos-latest | ||
target: x86_64-apple-darwin | ||
- os: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.target }} | ||
profile: minimal | ||
override: true | ||
- name: Build | ||
run: cargo build --release --target ${{ matrix.target }} | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TAG_NAME: ${{ github.ref }} # Assumes the tag name is the same as the ref. Adjust if necessary. | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
with: | ||
name: doclytics-${{ env.BRANCH_NAME }}-${{ matrix.os }} | ||
path: | | ||
./target/${{ matrix.target }}/release/doclytics${{ matrix.os == 'windows-latest' && '.exe' || '' }} | ||
build-docker: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.ref }} != 'master' && ${{ github.ref }} != 'development' | ||
env: | ||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Build | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/doclytics:${{ env.BRANCH_NAME }} | ||
platforms: linux/amd64,linux/arm64 |
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,20 @@ | ||
plugins: | ||
- "@semantic-release/commit-analyzer" | ||
- "@semantic-release/release-notes-generator" | ||
- - "@saithodev/semantic-release-backmerge" | ||
- backmergeBranches: | ||
- from: master | ||
to: development | ||
clearWorkspace: true | ||
backmergeStrategy: merge | ||
fastForwardMode: no-ff | ||
message: "chore(release): Preparations for next release [skip ci]" | ||
- - "@semantic-release/exec" | ||
- verifyReleaseCmd: "echo ${nextRelease.version} > VERSION.txt" | ||
- "@semantic-release/github" | ||
branches: | ||
- "+([0-9])?(.{+([0-9]),x}).x" | ||
- "master" | ||
- name: "development" | ||
prerelease: "rc" | ||
channel: "false" |
Oops, something went wrong.