Skip to content

Commit

Permalink
Add zip and remove unnecessary triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahanaFarooqui committed Nov 7, 2024
1 parent 44aa383 commit 6ccf3c0
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ name: Artifact

on:
push:
branches: [ master, 'Release-*' ]
tags: [ 'v*' ]
release:
types: [released]
# Triggers the workflow only when merging pull request to the branches.
pull_request:
types: [closed]
branches: [ master, 'Release-*' ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

inputs:
version:
description: 'Release version'
required: true

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -78,9 +76,15 @@ jobs:
key: ${{ runner.os }}-backend-${{ github.sha }}

- name: Compress files
run: tar -czf /tmp/rtlbuild.tar.gz frontend backend rtl.js package.json package-lock.json

env:
VERSION: "${{ github.event.release.tag_name || github.event.inputs.version || '' }}"
run: |
tar -czf /tmp/rtl-build-$VERSION.tar.gz frontend backend rtl.js package.json package-lock.json
zip -r /tmp/rtl-build-$VERSION.zip frontend backend rtl.js package.json package-lock.json
- uses: actions/upload-artifact@v3
with:
name: rtl-build-${{ github.event.release.tag_name }}
path: /tmp/rtlbuild.tar.gz
name: rtl-build-${{ github.event.release.tag_name || github.event.inputs.version || '' }}
path: |
/tmp/rtl-build-${{ github.event.release.tag_name || github.event.inputs.version || '' }}.tar.gz
/tmp/rtl-build-${{ github.event.release.tag_name || github.event.inputs.version || '' }}.zip

0 comments on commit 6ccf3c0

Please sign in to comment.