-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Dirk Peter <[email protected]>
- Loading branch information
1 parent
85af55e
commit cd271b3
Showing
5 changed files
with
99 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Create artifact (zip) on tag | ||
run-name: ${{ github.actor }} set a tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
# - 'v[0-9]+.[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: 'npm' | ||
- run: npm ci | ||
|
||
- run: echo "PACKAGE_JSON=$(jq -c . < package.json)" >> $GITHUB_ENV | ||
|
||
# - run: npm lint | ||
- run: npm test | ||
- run: npm run build | ||
|
||
- run: echo "ARCHIVE_NAME=${{ fromJson(env.PACKAGE_JSON).name }}_${{ fromJson(env.PACKAGE_JSON).version }}.zip" >> $GITHUB_ENV | ||
|
||
- name: Zip Build | ||
run: | | ||
cd ./dist/apps/${{ fromJson(env.PACKAGE_JSON).name }} | ||
zip -r ../../${{ env.ARCHIVE_NAME }} ./ | ||
# - name: Archive production artifacts | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: tag_archive | ||
# path: dist/${{ env.ARCHIVE_NAME }} | ||
# retention-days: 1 | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: dist/${{ env.ARCHIVE_NAME }} | ||
asset_name: ${{ env.ARCHIVE_NAME }} | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Build & Test | ||
run-name: ${{ github.actor }} is testing the implementation | ||
|
||
on: | ||
pull_request: | ||
branches: ['main'] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.x, 18.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
|
||
- run: npm run build | ||
- run: npm test | ||
# - run: npm lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters