Skip to content

Merge branch 'main' of https://github.com/anmalkov/crisp #9

Merge branch 'main' of https://github.com/anmalkov/crisp

Merge branch 'main' of https://github.com/anmalkov/crisp #9

Workflow file for this run

name: Release
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
build_and_release:
runs-on: ubuntu-latest
env:
DOTNET_VERSION: '7.0.x'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checkout data
uses: actions/checkout@v3
with:
repository: anmalkov/crisp-data
token: ${{ secrets.CRISP_DATA_TOKEN }}
path: src/repos/brief
- name: Remove unneeded files and folders
run: |
rm -rf src/repos/brief/.git
find src/repos/brief -type f -exec rm {} +
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Set version from tag
run: |
TAG_NAME=$(echo $GITHUB_REF | cut -d '/' -f 3)
VERSION=${TAG_NAME#v}
echo "TAG_VERSION=$VERSION" >> $GITHUB_ENV
echo "Updating project version to $VERSION"
sed -i "s/<AssemblyVersion>.*<\/AssemblyVersion>/<AssemblyVersion>$VERSION<\/AssemblyVersion>/g" Crisp.Core/Crisp.Core.csproj
sed -i "s/<FileVersion>.*<\/FileVersion>/<FileVersion>$VERSION<\/FileVersion>/g" Crisp.Core/Crisp.Core.csproj
sed -i "s/<AssemblyVersion>.*<\/AssemblyVersion>/<AssemblyVersion>$VERSION<\/AssemblyVersion>/g" Crisp.Ui/Crisp.Ui.csproj
sed -i "s/<FileVersion>.*<\/FileVersion>/<FileVersion>$VERSION<\/FileVersion>/g" Crisp.Ui/Crisp.Ui.csproj
working-directory: src
# - name: Restore dependencies
# run: dotnet restore
# working-directory: src/Crisp.Core
# - name: Build application
# run: dotnet build --configuration Release --no-restore
# working-directory: src/Crisp.Core
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
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: src
push: true
tags: |
anmalkov/crisp:${{ env.TAG_VERSION }}
anmalkov/crisp:latest