From 20e335d5daa39930d311578b3b2a150a941219db Mon Sep 17 00:00:00 2001 From: Marc Nijdam Date: Tue, 28 Feb 2023 13:09:47 -0600 Subject: [PATCH] bump lw-generator for regions --- .github/workflows/region_params.yml | 32 +++++++---------------------- .github/workflows/tools.yml | 10 ++++----- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/.github/workflows/region_params.yml b/.github/workflows/region_params.yml index 5eb262a..25890cd 100644 --- a/.github/workflows/region_params.yml +++ b/.github/workflows/region_params.yml @@ -13,23 +13,8 @@ on: - ".github/workflows/region_params.yml" jobs: - build-matrix: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - name: Setup | Checkout - uses: actions/checkout@v3 - - name: Build | Matrix - id: set-matrix - run: echo "matrix=$(find region_params -name '*.json' -exec basename -s '.json' {} + | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT - build: runs-on: ubuntu-latest - needs: [build-matrix] - strategy: - matrix: - region: ${{ fromJson(needs.build-matrix.outputs.matrix) }} steps: - name: Setup | Checkout @@ -41,24 +26,21 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: repo: helium/lorawan-h3 - tag: lw-generator-v0.2.1-rc.2 + tag: lw-generator-v0.3.0 - name: Build | Generate run: | - lw-generator params generate region_params/${{ matrix.region }}.json ${{ matrix.region }}.rpz - - release: - runs-on: ubuntu-latest - needs: [build] - if: startsWith(github.ref, 'refs/tags/region_params') + for region in `find region_params -name '*.json' -exec basename -s '.json' {} +`; do + lw-generator params generate region_params/${region}.json ${region}.rpz + done - steps: - name: Release | Artifacts + if: startsWith(github.ref, 'refs/tags/region_params') uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: fail_on_unmatched_files: true - name: region_params + name: ${{github.ref_name}} files: | - "*.rpz" + *.rpz diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index bbacf52..254f530 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -63,8 +63,8 @@ jobs: - name: Release | Prepare run: | - tar -zcv -C target/release -f linux.x86.64.tar.gz lw-generator - sha256sum -b --tag linux.x86.64.tar.gz > linux.x86.64.checksum + tar -zcv -C target/release -f linux.x64.tar.gz lw-generator + sha256sum -b --tag linux.x64.tar.gz > linux.x64.checksum - name: Release | Artifacts uses: softprops/action-gh-release@v1 @@ -72,7 +72,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: fail_on_unmatched_files: true - name: lw-generator + name: ${{github.ref_name}} files: | - linux.x86.64.tar.gz - linux.x86.64.checksum + linux.x64.tar.gz + linux.x64.checksum