update settings-builder #244
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run whenever code is pushed | |
on: | |
push: | |
name: Build | |
jobs: | |
build: | |
# This step runs on every push, ensures there is an artifact for each push | |
name: Build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Get version | |
id: version | |
run: | | |
# Use git commit sha to identify the version | |
VERSION=$(git rev-parse --short ${{ github.sha }}) | |
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" | |
- name: Write version to metadata.json | |
uses: jossef/[email protected] | |
with: | |
file: metadata.json | |
field: version | |
value: ${{ steps.version.outputs.VERSION }} | |
- name: Create filename | |
id: filename | |
run: echo "FILENAME=mapeo-default-config_${{ steps.version.outputs.VERSION }}.mapeoconfig" >> "$GITHUB_OUTPUT" | |
- run: npm ci | |
- name: Build asset | |
id: build_asset | |
run: | | |
mkdir -p build | |
$(npm root)/.bin/mapeo-settings build -l 'en' -o build/${{ steps.filename.outputs.FILENAME }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.filename.outputs.FILENAME }} | |
path: build/${{ steps.filename.outputs.FILENAME }} |