diff options
| author | Kevin Hoerr <kjhoerr@protonmail.com> | 2022-12-28 12:53:15 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-28 12:53:15 -0500 |
| commit | 35b3ab647534506de4d8c9bc1bdcfe0cbc871c86 (patch) | |
| tree | 42b9d7bf71fb77ba307f211673cfbc67d8801918 /.github | |
| parent | 2eeda3ac87e23297c9bd8253634be5eb4ab23f89 (diff) | |
| download | submelon.dev-35b3ab647534506de4d8c9bc1bdcfe0cbc871c86.tar.gz submelon.dev-35b3ab647534506de4d8c9bc1bdcfe0cbc871c86.tar.bz2 submelon.dev-35b3ab647534506de4d8c9bc1bdcfe0cbc871c86.zip | |
Fix use of deprecated workflows feature (#55)
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build.yml | 29 |
1 files changed, 15 insertions, 14 deletions
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 |
