From 60fcf2c70f263e464acf79845754437c6a1f14c0 Mon Sep 17 00:00:00 2001 From: Gregor MacLennan Date: Thu, 18 Apr 2024 11:11:08 +0100 Subject: [PATCH] chore: fix CI build step (#47) * chore: fix CI build step * update CI actions * update step output params (set-output deprecated by github) --- .github/workflows/build.yml | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99eddd03..b841d030 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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: | @@ -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 @@ -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'