Skip to content

Commit

Permalink
workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
extedcouD committed Jul 10, 2024
1 parent e800d9c commit 112bf94
Showing 1 changed file with 53 additions and 39 deletions.
92 changes: 53 additions & 39 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Build Binary
name: Create Release on Tag

on:
push:
tags:
- "*" # Runs on any new tag push
release:
types: [created]
- "*"

jobs:
build:
Expand All @@ -17,7 +15,7 @@ jobs:
BACKEND_EDITOR_PATH: backend-editor/component-modifier

steps:
- name: Checkout code
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
Expand All @@ -33,15 +31,10 @@ jobs:
cd ${{ env.FRONTEND_EDITOR_PATH }} && npm install
cd ${{ env.ROOT_PATH }}
cd ${{ env.BACKEND_EDITOR_PATH }} && npm install
- name: Create binary
run: node create-build.js
- name: url print
run: |
echo "Listing ${{github.event.release.upload_url}}"
- name: List files for debugging
run: |
echo "Listing files in backend-editor/component-modifier directory:"
ls -la backend-editor/component-modifier

- name: Archive Windows binary
uses: actions/upload-artifact@v3
with:
Expand All @@ -60,7 +53,21 @@ jobs:
name: component-modifier-binary-macos
path: backend-editor/component-modifier/component-modifier-binary-macos

- name: Create Release
create_release:
runs-on: ubuntu-latest
needs: build

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Download build artifact
uses: actions/download-artifact@v2
with:
name: build-artifact
path: ./build

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
Expand All @@ -69,29 +76,36 @@ jobs:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this release:
- AUTO RELEASE WITH TAG CREATION ${{ github.ref }}
# - name: Upload Windows binary to release
# uses: actions/upload-release-asset@v1
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: backend-editor/component-modifier/component-modifier-binary-win.exe
# asset_name: component-modifier-binary-win.exe
# asset_content_type: application/octet-stream

# - name: Upload Linux binary to release
# uses: actions/upload-release-asset@v1
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: backend-editor/component-modifier/component-modifier-binary-linux
# asset_name: component-modifier-binary-linux
# asset_content_type: application/octet-stream

# - name: Upload Mac binary to release
# uses: actions/upload-release-asset@v1
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: backend-editor/component-modifier/component-modifier-binary-macos
# asset_name: component-modifier-binary-macos
# asset_content_type: application/octet-stream
Release for ${{ github.ref }}
draft: false
prerelease: false

- name: 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: backend-editor/component-modifier/component-modifier-binary-win.exe
asset_name: component-modifier-binary-win
asset_content_type: application/octet-stream

- name: 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: backend-editor/component-modifier/component-modifier-binary-linux
asset_name: component-modifier-binary-linux
asset_content_type: application/octet-stream

- name: 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: backend-editor/component-modifier/component-modifier-binary-macos
asset_name: component-modifier-binary-macos
asset_content_type: application/octet-stream

0 comments on commit 112bf94

Please sign in to comment.