Skip to content

Update release-build.yml #7

Update release-build.yml

Update release-build.yml #7

Workflow file for this run

name: Build and Release
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install tools
run: |
sudo apt-get update
sudo apt-get install -y zip
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Create Release
if: github.event_name == 'push'
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: action-build
release_name: Action Build
- name: Upload Release Asset
if: github.event_name == 'push'
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist.zip
asset_name: dist.zip
asset_content_type: application/zip