Build and Package #24
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 Package | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| source_branch: | |
| description: 'The source branch or ref to build from' | |
| default: 'main' | |
| required: true | |
| release_name: | |
| description: 'The name for the release' | |
| required: true | |
| jobs: | |
| release: | |
| environment: OSSign | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 'Beaver-Notes/Beaver-Notes' | |
| ref: ${{ github.event.inputs.source_branch }} | |
| fetch-depth: 1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile --network-timeout 1000000 | |
| - name: build Vite bundles | |
| run: yarn build | |
| - name: Build and conditionally publish Electron app | |
| shell: bash | |
| env: | |
| AST_VAULT: ${{ secrets.AST_VAULT }} | |
| AST_CERT: ${{ secrets.AST_CERT }} | |
| AST_IDENT: ${{ secrets.AST_IDENT }} | |
| AST_SECRET: ${{ secrets.AST_SECRET }} | |
| AST_TENANT: ${{ secrets.AST_TENANT }} | |
| AST_TIMESTAMP: ${{ secrets.AST_TIMESTAMP }} | |
| AST_TD: ${{ secrets.AST_TD }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| curl -L https://github.com/vcsjones/AzureSignTool/releases/download/v6.0.1/AzureSignTool-x64.exe -o AzureSignTool.exe | |
| yarn electron-builder build --config electron-builder.config.cjs --publish never | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| dist/* | |
| README.md | |
| package.json | |
| yarn.lock | |
| name: ${{ github.event.inputs.release_name }} | |
| tag_name: ${{ github.run_id }} | |
| body: | | |
| # Signed Release ${{ github.event.inputs.release_name }} | |
| These are the distributable files for the signed release of Beaver-Notes ${{ github.event.inputs.release_name }} | |
| The source code was fetched from https://github.com/Beaver-Notes/Beaver-Notes@${{ github.event.inputs.source_branch }} | |