Skip to content

Commit

Permalink
New github action for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
ammont82 committed Oct 7, 2024
1 parent 44e8081 commit dbc4c70
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,42 @@
name: Create Release with TGZ
name: Create a new release

on:
release:
types: [created]

jobs:
build:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20'

- name: Enable Corepack
run: |
corepack enable
corepack prepare [email protected] --activate
- name: Install dependencies
run: yarn install
- name: Bundle agent

- name: Build and bundle
run: |
cd apps/agent
yarn bundle
- name: Rename bundle
run: mv apps/agent/dist/*.tgz apps/agent/dist/agent-${{ github.event.release.tag_name }}.tgz

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./apps/agent/*.tgz
asset_name: agent-${{ github.sha }}.tgz
asset_path: ./apps/agent/dist/agent-${{ github.event.release.tag_name }}.tgz
asset_name: agent-${{ github.event.release.tag_name }}.tgz
asset_content_type: application/gzip

0 comments on commit dbc4c70

Please sign in to comment.