mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-11-14 03:48:34 +05:30
Release and tar file with CI
This commit is contained in:
parent
89a509a13e
commit
d45eb79bb5
1 changed files with 28 additions and 0 deletions
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
|
|
@ -84,6 +84,34 @@ jobs:
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
build-and-upload-release:
|
||||||
|
name: Build and Upload build to Github Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- test-and-build
|
||||||
|
- e2e-test
|
||||||
|
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '18'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm install
|
||||||
|
- name: Build project
|
||||||
|
run: npm run build
|
||||||
|
- name: Create archives
|
||||||
|
run: |
|
||||||
|
tar -cvzf release.tar.gz -C dist $(ls dist)
|
||||||
|
- name: Upload Binaries to Release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
tag: ${{ github.ref_name }}
|
||||||
|
file: release.tar.gz
|
||||||
deploy:
|
deploy:
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
needs:
|
needs:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue