Skip to content

Commit

Permalink
Create build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
staFF6773 authored Nov 20, 2024
1 parent f1f53e2 commit 8132a0e
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI
permissions: write-all
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get version
run: echo "version=$(jq -r .version package.json)" >> $GITHUB_ENV

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
tag_name: ${{ env.version }}
release_name: release ${{ env.version }}
draft: false
prerelease: ${{ contains(env.version, 'beta') || contains(env.version, 'alpha') }}

build-launcher:
needs: create-release
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 18.x

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Install Dependencies
run: npm ci
shell: bash

- name: Build
env:
GH_TOKEN: ${{ secrets.github_token }}
run: npm run build
shell: bash

0 comments on commit 8132a0e

Please sign in to comment.