luiztauffer is building a Mac release #26
This file contains hidden or 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 Publish — Mac Intel | |
| run-name: ${{ github.actor }} is building a Mac release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| permissions: | |
| actions: write | |
| contents: write | |
| packages: write | |
| jobs: | |
| build-for-mac: | |
| runs-on: macos-13 | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Conda environment | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| environment-file: environment-mac-x86.yml | |
| activate-environment: vame-desktop | |
| auto-activate-base: false | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Set version based on branch | |
| id: set-version | |
| run: | | |
| BASE_VERSION=$(node -p "require('./package.json').version") | |
| if [[ "${{ github.ref_name }}" == "dev" ]]; then | |
| echo "VERSION=${BASE_VERSION}-dev" >> $GITHUB_ENV | |
| else | |
| echo "VERSION=${BASE_VERSION}" >> $GITHUB_ENV | |
| fi | |
| echo "Using version: $VERSION" | |
| - uses: apple-actions/import-codesign-certs@v3 | |
| with: | |
| p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} | |
| p12-password: ${{ secrets.MAOS_CERTIFICATE_PWD }} | |
| - name: Build and publish for MacOS | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npm run build:mac -- --publish=always --x64 --config.extraMetadata.version=${{ env.VERSION }} |