Skip to content

Commit

Permalink
Merge branch 'main' into node20
Browse files Browse the repository at this point in the history
* main:
  chore: fix CI build step (#47)
  • Loading branch information
gmaclennan committed Apr 18, 2024
2 parents ac5d4c9 + 60fcf2c commit 7e122f0
Showing 1 changed file with 14 additions and 19 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
version: ${{ steps.pkg.outputs.prop }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Configure git user & email
Expand Down Expand Up @@ -81,17 +81,11 @@ jobs:
artifact: ${{ steps.filename.outputs.filename }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Get package name
id: pkg_name
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'name'
- name: Get version
id: version
run: |
Expand All @@ -102,26 +96,27 @@ jobs:
# Get a short ID to the commit used to build this version
VERSION=$(git rev-parse --short ${{ github.sha }})
fi
echo ::set-output name=version::$VERSION
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
- name: Write version to metadata.json
uses: jossef/action-set-json-field@v1
uses: jossef/action-set-json-field@v2.1
with:
file: metadata.json
field: version
value: ${{ steps.version.outputs.version }}
value: ${{ steps.version.outputs.VERSION }}
- name: Create filename
id: filename
run: echo ::set-output name=filename::${{ steps.pkg_name.outputs.prop }}_${{ steps.version.outputs.version }}.mapeoconfig
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
npx mapeo-settings build -l 'en' -o build/${{ steps.filename.outputs.filename }}
- uses: actions/upload-artifact@v2
$(npm 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 }}
name: ${{ steps.filename.outputs.FILENAME }}
path: build/${{ steps.filename.outputs.FILENAME }}
upload-release:
name: Upload release
runs-on: ubuntu-20.04
Expand All @@ -130,7 +125,7 @@ jobs:
steps:
- name: Download artifact
id: download
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.artifact }}
- name: 'Echo download path'
Expand Down

0 comments on commit 7e122f0

Please sign in to comment.