Skip to content

Commit

Permalink
bump lw-generator for regions
Browse files Browse the repository at this point in the history
  • Loading branch information
madninja committed Feb 28, 2023
1 parent 276b913 commit 20e335d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 30 deletions.
32 changes: 7 additions & 25 deletions .github/workflows/region_params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
10 changes: 5 additions & 5 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ 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
env:
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

0 comments on commit 20e335d

Please sign in to comment.