Skip to content

VS Mac

VS Mac #2805

Workflow file for this run

name: VS Mac
on:
workflow_dispatch:
push:
paths-ignore:
- '**/*'
- '!.github/workflows/vsmac.yml'
- '!src/VSMac/**/*'
- '!src/Core/**/*'
- '!src/Makefile'
- '!src/global.json'
branches:
- '*'
pull_request:
branches:
- '*'
schedule:
- cron: '0 8 * * *'
env:
VERSION: 1.7.${{ github.run_number }}
jobs:
build:
runs-on: macos-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Update Extension Version Info
run: |
sed -i -e 's/1.0/${{ env.VERSION }}/g' ./AddinInfo.cs
cat ./AddinInfo.cs
working-directory: src/VSMac/ApiClientCodeGen.VSMac/Properties
- name: Build
run: make
working-directory: src
- name: Archive binaries
run: zip -r VSMac-Binaries.zip .
working-directory: src/VSMac/ApiClientCodeGen.VSMac/bin/Release/
- name: Publish binaries
uses: actions/upload-artifact@v2
with:
name: Binaries
path: src/VSMac/ApiClientCodeGen.VSMac/bin/Release/VSMac-Binaries.zip
- name: Rename build output
run: mv *.mpack ApiClientCodeGenerator-${{ env.VERSION }}.mpack
working-directory: src
- name: Publish artifacts
uses: actions/upload-artifact@v2
with:
name: Extension
path: |
src/*.mpack
src/*.mrep
src/index.html
docs/VisualStudioForMac.md
deploy:
runs-on: ubuntu-latest
timeout-minutes: 10
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
with:
repository: christianhelle/vsmac-extensions-repo
ref: 'main'
token: ${{ secrets.ACTIONS_GITHUB_TOKEN }}
- uses: actions/download-artifact@v3
with:
path: artifacts
- name: Move artifact to beta folder
run: |
mv artifacts/Extension/src/ApiClientCodeGenerator-${{ env.VERSION }}.mpack beta/ApiClientCodeGenerator.mpack
rm -rf artifacts
- name: Git Commit Build Artifacts
run: |
git config --global user.name "Continuous Integration"
git config --global user.email "username@users.noreply.github.com"
git add beta/ApiClientCodeGenerator.mpack
git commit -m "Update beta .mpack file to version ${{ env.VERSION }}"
git push