From 4e6f2fd9332217326e382d4ed6be9b420c6099f4 Mon Sep 17 00:00:00 2001 From: Matt Troutman Date: Sun, 19 May 2024 03:04:54 -0500 Subject: [PATCH] Adding release.yml --- .github/workflows/release.yml | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4cb9231 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 \ No newline at end of file