Skip to content

Commit

Permalink
chore: fix CI build step (#47)
Browse files Browse the repository at this point in the history
* chore: fix CI build step

* update CI actions

* update step output params

(set-output deprecated by github)
  • Loading branch information
gmaclennan authored Apr 18, 2024
1 parent b2895b5 commit 60fcf2c
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 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 12
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '12'
- 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 12
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '12'
- 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,26 @@ 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
$(npm bin)/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 +124,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 60fcf2c

Please sign in to comment.