Adding release.yml

This commit is contained in:
Matt Troutman 2024-05-19 03:04:54 -05:00
parent c1ee03d926
commit 4e6f2fd933
Signed by: trtmn
SSH Key Fingerprint: SHA256:cgYdsbnbA0S6X4anVowEAntjEpGV7nMyk2NW6ZYoNjE

46
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,46 @@
name: Create Release
on:
push:
branches:
- main # or the name of your default branch
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build # or your build command
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
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: ./dist/your-asset.zip # replace with the path to your asset
asset_name: your-asset.zip # replace with the name of your asset
asset_content_type: application/zip