Skip to content

updated version to 3.13.1 #187

updated version to 3.13.1

updated version to 3.13.1 #187

Workflow file for this run

name: Release Packages
permissions:
contents: write
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
# We need to verify the version in some packages with the tag in order to have the same version in all packages (python, csharp, angular, web).
# Some packages use an internal version (like csharp, angular and web) and some use the tag version (like python).
verify-versions:
name: Verify Versions
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- run: npm i -g pnpm @antfu/ni
- name: Setup Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version: 18.x
cache: pnpm
- name: Install Dependencies
run: nci
- name: Verify Versions
run: nr verify-versions ${{ github.ref_name }}
release-csharp-packages:
needs: [verify-versions]
name: Release C# Packages
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- packages/csharp/ArmoniK.Api.Common.Channel/ArmoniK.Api.Common.Channel.csproj
- packages/csharp/ArmoniK.Api.Common/ArmoniK.Api.Common.csproj
- packages/csharp/ArmoniK.Api.Core/ArmoniK.Api.Core.csproj
- packages/csharp/ArmoniK.Api.Client/ArmoniK.Api.Client.csproj
- packages/csharp/ArmoniK.Api.Worker/ArmoniK.Api.Worker.csproj
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- name: Install .NET Core
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3
with:
dotnet-version: 6.x
- name: Build the package
run: |
dotnet build ${{ matrix.package }} -c Release
- name: Pack the package
run: |
dotnet pack ${{ matrix.package }} -c Release -o /tmp/packages
ls /tmp/packages
- name: Push the package
run: dotnet nuget push /tmp/packages/ArmoniK.Api.*.nupkg -k ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
release-python-package:
needs: [verify-versions]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- name: pip update and add build package
run: |
cd ./packages/python
export RELEASE=true
bash proto2python.sh ~/pyvenv
- name: Upload as artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: python-packages
path: packages/python/pkg/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
print_hash: true
packages_dir: packages/python/pkg/
release-angular-packages:
needs: [verify-versions]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- run: npm i -g pnpm @antfu/ni
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version: 18
cache: pnpm
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: nci && cd packages/angular && nci
- name: Install Protoc
run: sudo apt install -y protobuf-compiler
- name: Build protos
run: cd packages/angular && nr proto:generate:linux
- name: Build angular
run: cd packages/angular && nr build
- name: Release package
run: nr ci:publish angular dist/aneoconsultingfr/armonik.api.angular
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
release-web-packages:
needs: [verify-versions]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- run: npm i -g pnpm @antfu/ni
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version: 18
cache: pnpm
registry-url: https://registry.npmjs.org/
- name: Install ni
run: npm i -g @antfu/ni pnpm
- name: Install dependencies
run: nci && cd packages/web && nci
- name: Install Protoc
run: sudo apt install -y protobuf-compiler
- name: Build protos
run: cd packages/web && nr proto:generate:linux
- name: Build web
run: cd packages/web && nr build
- name: Release package
run: nr ci:publish web
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
release-cpp-package:
needs: [verify-versions]
strategy:
fail-fast: false
matrix:
type: [tar.gz, deb, rpm]
name: Build C++ Packages [${{ matrix.type }}]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
ref: ${{ github.ref }}
- name: Build the package
run: |
cd packages/cpp/tools/packaging
./make-${{ matrix.type }}.sh
- name: Publish package as artefact
uses: actions/upload-artifact@65d862660abb392b8c4a3d1195a2108db131dd05
with:
if-no-files-found: error
path: packages/cpp/tools/packaging/*.${{ matrix.type }}
name: libarmonik-${{ github.ref_name }}.${{ matrix.type }}
- name: Upload to release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
gh release upload ${{ github.ref_name }} packages/cpp/tools/packaging/*.${{ matrix.type }}
update-changelog:
needs: [verify-versions]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- name: Set node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version: 18
- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}