Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate building and releasing sources #11

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and release

on:
push:
branches:
- main

jobs:
build-and-release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: main

- name: Checkout release branch
run: |
git checkout release
git rebase main

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
run: npm install

- name: Lint code
run: npm run lint

- name: Run tests
run: npm run test

- name: Compile
run: npm run compile

- name: Commit and push build files
run: |
git add ./build
git commit -m "Build sources"
git push

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: 'release-${{ github.run_id }}'
name: 'Release ${{ github.run_id }}'
body: 'Auto-generated release'