mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 22:21:51 +00:00
Create release.yml
This commit is contained in:
1 parent
f6fb7cc017
commit
a31df20979
1 file changed
+48
@@ -0,0 +1,48 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
name: Build and Create Tagged Release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Install archive tools
|
||||
run: sudo apt install zip
|
||||
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.ref }}
|
||||
|
||||
- name: Set env
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Run build
|
||||
run: yarn build
|
||||
|
||||
- name: Bundle files
|
||||
run: |
|
||||
mv dist oxmysql
|
||||
zip -r oxmysql-${{ env.RELEASE_VERSION }}.zip dist
|
||||
|
||||
- name: Create Release
|
||||
uses: "marvinpinto/[email protected]"
|
||||
id: auto_release
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
title: ${{ env.RELEASE_VERSION }}
|
||||
prerelease: false
|
||||
files: oxmysql-${{ env.RELEASE_VERSION }}.zip
|
||||
|
||||
env:
|
||||
CI: false
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in new issue
Block a user