Skip to content

chore(deps): update github actions #3227

chore(deps): update github actions

chore(deps): update github actions #3227

Workflow file for this run

name: Publish Edge Packages
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
genversion:
if: github.actor != 'renovate[bot]' && github.repository_owner == 'aneoconsulting'
runs-on: ubuntu-latest
name: Version
outputs:
version: ${{ steps.genver.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Generate Version
id: genver
run: echo "VERSION=$(npx @aneoconsultingfr/generate-next-version@latest --edge)" >> "$GITHUB_OUTPUT"
- name: Summary version
# Print to the summary
run: echo "VERSION=${{ steps.genver.outputs.version }}" >> $GITHUB_STEP_SUMMARY
version:
if: contains( ${{ needs.genversion.outputs.version }} , "-")
needs: [genversion]
runs-on: ubuntu-latest
name: Check Version
outputs:
version: ${{ steps.outver.outputs.version }}
steps:
- name: Output Version
id: outver
run: echo "VERSION=${{ needs.genversion.outputs.version }}" >> "$GITHUB_OUTPUT"
tests:
if: github.actor != 'renovate[bot]' && github.repository_owner == 'aneoconsulting'
name: Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projects:
- packages/csharp/ArmoniK.Api.Tests
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4
with:
dotnet-version: 6.x
- name: Run tests
run: |
cd ${{ matrix.projects }}
dotnet test --logger "trx;LogFileName=test-results.trx"
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Test - ${{ matrix.os }} ${{ matrix.projects }}
path: ${{ matrix.projects }}/TestResults/test-results.trx
reporter: dotnet-trx
release-csharp-packages:
needs: [tests, version]
name: Release C# Packages
runs-on: ubuntu-latest
timeout-minutes: 10
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Install .NET Core
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4
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 -p:PackageVersion=${{ needs.version.outputs.version }}
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-angular-package:
needs: [version]
if: github.ref == 'refs/heads/main'
name: Release Angular Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- run: npm i -g @antfu/ni pnpm
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
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: Update version
run: nr update-versions ${{ needs.version.outputs.version }}
- name: Build package
run: cd packages/angular && nr build
- name: Release package
run: nr ci:publish-edge angular dist/aneoconsultingfr/armonik.api.angular
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
release-web-package:
needs: [version]
if: github.ref == 'refs/heads/main'
name: Release Web Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- run: npm i -g @antfu/ni pnpm
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
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 package
run: cd packages/web && nr build
- name: Update version
run: nr update-versions ${{ needs.version.outputs.version }}
- name: Release package
run: nr ci:publish-edge web
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
release-python-package:
needs: [version]
if: github.actor != 'renovate[bot]' && github.repository_owner == 'aneoconsulting'
name: Release Python Package
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/python
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: pip update and add build package
run: bash proto2python.sh ~/pyvenv
- name: Upload as artifact
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
name: python-packages
path: packages/python/pkg/
- name: Publish to PyPITest
if: github.ref != 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.DEV_PYPI_API_TOKEN }}
print-hash: true
packages-dir: packages/python/pkg/
repository-url: https://test.pypi.org/legacy/
release-cpp-package:
needs: [version]
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
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@6f51ac03b9356f520e9adb1b1b7802705f340c2b
with:
if-no-files-found: error
path: packages/cpp/tools/packaging/*.${{ matrix.type }}
name: libarmonik.${{ matrix.type }}
# TODO Upload to a more permanent storage
release-java-package:
needs: [version]
name: Release Java Package
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/java
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Maven Central Repository
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4
with:
java-version: '17'
distribution: temurin
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish package
run: |
mvn versions:set -DnewVersion=${{ needs.version.outputs.version }}
mvn --batch-mode deploy -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }}