From de189af19f034e21815cf5bd312b7580405625c9 Mon Sep 17 00:00:00 2001 From: "Axel Garcia K." Date: Tue, 29 Jul 2025 18:07:12 +0100 Subject: [PATCH 1/2] NRL-1544 Automatic build of documentation --- .github/workflows/continuous-integration.yml | 43 ++++++++++++++++---- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index d148a23..aa68792 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -1,16 +1,19 @@ name: Create Release -on: push +on: + push: + branches: + - master + - feature/axkr1-NRL-1544-automatic-build-artifacts # TODO: revert to master after testing jobs: create_release: name: build runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' steps: - name: Checkout uses: actions/checkout@v2 with: - fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function + fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function - name: Install Python 3.12 uses: actions/setup-python@v1 @@ -18,7 +21,7 @@ jobs: python-version: 3.12 - name: Upgrade python pip - run: python -m pip install --upgrade pip + run: python -m pip install --upgrade pip - name: Install git run: pip install gitpython @@ -31,14 +34,40 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '24' + + - name: Install dependencies + run: make install-node + + - name: Run publish + run: make publish + + # - name: Upload documentation artifact + # uses: actions/upload-artifact@v4 + # with: + # name: nrl-consumer-api-json + # path: build/nrl-consumer-api.json + - name: Create release (master only) id: create-release - if: github.ref == 'refs/heads/master' uses: actions/create-release@v1 continue-on-error: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ env.SPEC_VERSION }} - release_name: ${{ env.SPEC_VERSION }} + tag_name: test-${{ env.SPEC_VERSION }} + release_name: test-${{ env.SPEC_VERSION }} + + - name: Upload documentation asset to release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create-release.outputs.upload_url }} + asset_path: build/nrl-consumer-api.json + asset_name: nrl-consumer-api.json + asset_content_type: application/json From eecce09b50c9444d66ba568f46aafd6040c889f9 Mon Sep 17 00:00:00 2001 From: "Axel Garcia K." Date: Tue, 29 Jul 2025 18:57:48 +0100 Subject: [PATCH 2/2] NRL-1544 Remove test code --- .github/workflows/continuous-integration.yml | 26 +++++++------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index aa68792..2ca7b66 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -3,7 +3,6 @@ on: push: branches: - master - - feature/axkr1-NRL-1544-automatic-build-artifacts # TODO: revert to master after testing jobs: create_release: @@ -34,6 +33,15 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true + - name: Create release (master only) + id: create-release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.SPEC_VERSION }} + release_name: ${{ env.SPEC_VERSION }} + - name: Set up Node.js uses: actions/setup-node@v4 with: @@ -45,22 +53,6 @@ jobs: - name: Run publish run: make publish - # - name: Upload documentation artifact - # uses: actions/upload-artifact@v4 - # with: - # name: nrl-consumer-api-json - # path: build/nrl-consumer-api.json - - - name: Create release (master only) - id: create-release - uses: actions/create-release@v1 - continue-on-error: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: test-${{ env.SPEC_VERSION }} - release_name: test-${{ env.SPEC_VERSION }} - - name: Upload documentation asset to release uses: actions/upload-release-asset@v1 env: