Update tag_name in build.yaml #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | |
on: | |
push: | |
branches: | |
- build | |
jobs: | |
build-and-release: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Extract version from package.json | |
run: | | |
VERSION=$(cat package.json | grep version | awk -F: '{ print $2 }' | sed 's/[",]//g' | xargs) | |
echo "Version: $VERSION" | |
echo "::set-output name=VERSION::$VERSION" | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: npm install | |
- name: Build for MacOS | |
run: npm run build:macos | |
- name: Build for Windows | |
run: npm run build:win | |
- name: Build for Linux | |
run: npm run build:linux | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
./dist/mockingbird-proxy-portable-*.exe | |
./dist/mockingbird-proxy-*.dmg | |
./dist/mockingbird-proxy-*.AppImage | |
token: ${{ secrets.GH_TOKEN }} | |
tag_name: v${{ steps.package_version.outputs.VERSION }} | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |