From 35b3ab647534506de4d8c9bc1bdcfe0cbc871c86 Mon Sep 17 00:00:00 2001 From: Kevin Hoerr Date: Wed, 28 Dec 2022 12:53:15 -0500 Subject: Fix use of deprecated workflows feature (#55) --- .github/workflows/build.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to '.github/workflows/build.yml') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26a091e..003a648 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,32 +15,33 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - name: Install Node.js packages - run: npm ci - - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%s')" - - uses: dorny/paths-filter@v2 + - name: Get changed files under src directory + uses: dorny/paths-filter@v2 id: filter with: filters: | source: - 'src/**' - # modify version number if actual source files changed + + - name: Get current date + id: date + run: echo "DATE_VERSION=$(date +'%s')" >> $GITHUB_OUTPUT - name: Modify version number uses: mingjun97/file-regex-replace@v1 if: steps.filter.outputs.source == 'true' with: regex: 'version: "[0-9]*",' - replacement: 'version: "${{ steps.date.outputs.date }}",' + replacement: 'version: "${{ steps.date.outputs.DATE_VERSION }}",' include: 'gatsby-config\.ts' + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Install Node.js packages + run: npm ci + - name: Clean Gatsby cache run: npm run clean - name: Run Gatsby Build -- cgit