Skip to content

Commit

Permalink
Fix release GH Action's way of including dist/* files
Browse files Browse the repository at this point in the history
  • Loading branch information
oleiade committed May 13, 2024
1 parent f75fa14 commit bdc2d53
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: Release

on:
push:
tags:
- v*
push:
tags:
- v*

jobs:
checks:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Install dependencies
run: npm install
- name: Build & archive
run: |
set -x
VERSION="${GITHUB_REF##*/}"
npm run webpack && tar -zcf "k6-jslib-aws-${VERSION}.tar.gz" -C dist .
- name: Create release with assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
VERSION="${GITHUB_REF##*/}"
gh release create "${VERSION}" "k6-jslib-aws-${VERSION}.tar.gz" "dist/*" --target "${GITHUB_SHA}" --title "${VERSION}"
checks:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Install dependencies
run: npm install
- name: Build & archive
run: |
set -x
VERSION="${GITHUB_REF##*/}"
npm run webpack && tar -zcf "k6-jslib-aws-${VERSION}.tar.gz" -C dist .
- name: Create release with assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -x
VERSION="${GITHUB_REF##*/}"
gh release create "${VERSION}" "k6-jslib-aws-${VERSION}.tar.gz" dist/* --target "${GITHUB_SHA}" --title "${VERSION}"

0 comments on commit bdc2d53

Please sign in to comment.