Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLA-1672] add release action #86

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Upload Release Asset
on:
push:
tags:
- 'v*'

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Copy config.json
run: |
cp ./resources/js/config.json.default ./resources/js/config.json
- name: Build project
run: npm run prod-laravel
- name: Install zip
uses: montudor/action-zip@v1
- name: Zip output
run: zip -qq -r build.zip public/build
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build.zip
asset_name: build.zip
asset_content_type: application/zip
16 changes: 8 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build App
on:
pull_request:
paths-ignore:
- '**.md'
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
push:
paths-ignore:
- '**.md'

jobs:
build:
Expand All @@ -21,8 +21,8 @@ jobs:
run: npm install
- name: Copy config.json
run: |
cp ./resources/js/config.json.example ./resources/js/config.json
- name: Build static project
cp ./resources/js/config.json.default ./resources/js/config.json
- name: Build project
run: npm run prod-laravel
- name: Archive build artifacts
uses: actions/upload-artifact@v2
Expand Down
6 changes: 6 additions & 0 deletions resources/js/config.json.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"route": "/",
"tenant": "false",
"websocket": "",
"channel": ""
}
Loading