Files
sqlpage--sqlpage/.github/workflows/release.yml
Ophir LOJKINE d8106e8491
Create Release / Build sqlpage binaries (macOS & Windows) (.exe, windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
Create Release / Build sqlpage binaries (macOS & Windows) (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
Create Release / Build sqlpage binaries (Linux) (push) Has been cancelled
Create Release / Build AWS Lambda Serverless zip image (push) Has been cancelled
Create Release / Create Github Release (push) Has been cancelled
CI / compile_and_lint (push) Has been cancelled
CI / test (mssql) (push) Has been cancelled
CI / test (mysql) (push) Has been cancelled
CI / test (postgres) (push) Has been cancelled
CI / windows_test (push) Has been cancelled
CI / docker_build (linux/amd64) (push) Has been cancelled
CI / docker_build (linux/arm/v7) (push) Has been cancelled
CI / docker_build (linux/arm64) (push) Has been cancelled
CI / docker_push (push) Has been cancelled
Create Release / Publish to crates.io (push) Has been cancelled
Sign windows build with signpath.io (#990)
* Sign windows build with signpath.io

Thanks to signpath.io for providing us with a free windows signing certificate !

- Added permissions for actions read access.
- Implemented unsigned artifact upload for Windows.
- Integrated SignPath for signing requests and added signed artifact upload.
- Updated non-Windows artifact upload process.

* release signing + link to signpath from README
2025-09-02 15:48:40 +02:00

150 lines
5.3 KiB
YAML

on:
workflow_dispatch: {}
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
branches:
- "release-test"
name: Create Release
permissions:
contents: write
actions: read
jobs:
build-macos-windows:
name: Build sqlpage binaries (macOS & Windows)
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
include:
- os: windows-latest
binary_extension: .exe
target: x86_64-pc-windows-msvc
- os: macos-latest
target: x86_64-apple-darwin
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Set up cargo cache
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
- name: Build
run: cargo build --profile superoptimized --locked --target ${{ matrix.target }}
- name: Upload unsigned Windows artifact
if: matrix.os == 'windows-latest'
id: upload_unsigned
uses: actions/upload-artifact@v4
with:
name: unsigned-windows
path: target/${{ matrix.target }}/superoptimized/sqlpage.exe
if-no-files-found: error
- name: Submit signing request to SignPath
if: matrix.os == 'windows-latest'
id: signpath
uses: signpath/github-action-submit-signing-request@v1.1
with:
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
organization-id: '45fd8443-c7ca-4d29-a68b-608948185335'
project-slug: 'sqlpage'
signing-policy-slug: 'release-signing'
github-artifact-id: ${{ steps.upload_unsigned.outputs.artifact-id }}
wait-for-completion: true
output-artifact-directory: './signed-windows'
- name: Upload signed Windows artifact
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: sqlpage windows-latest
path: signed-windows/sqlpage.exe
if-no-files-found: error
- name: Upload artifact (non-Windows)
if: matrix.os != 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: sqlpage ${{ matrix.os }}
path: target/${{ matrix.target }}/superoptimized/sqlpage${{ matrix.binary_extension }}
if-no-files-found: error
build-linux:
name: Build sqlpage binaries (Linux)
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux_2_28_x86_64
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu
- name: Set up cargo cache
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
- name: Build
run: cargo build --profile superoptimized --locked --target x86_64-unknown-linux-gnu
- uses: actions/upload-artifact@v4
with:
name: sqlpage ubuntu-latest
path: target/x86_64-unknown-linux-gnu/superoptimized/sqlpage
if-no-files-found: error
build-aws:
name: Build AWS Lambda Serverless zip image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: docker build -t sqlpage-lambda-builder . -f lambda.Dockerfile --target builder
- run: docker run sqlpage-lambda-builder cat deploy.zip > sqlpage-aws-lambda.zip
- uses: actions/upload-artifact@v4
with:
name: sqlpage aws lambda serverless image
path: sqlpage-aws-lambda.zip
create_release:
name: Create Github Release
needs: [build-macos-windows, build-linux, build-aws]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- run: |
rm -rf sqlpage/templates/*.handlebars;
chmod +x sqlpage*/sqlpage;
mv 'sqlpage macos-latest/sqlpage' sqlpage.bin;
tar --create --file sqlpage-macos.tgz --gzip sqlpage.bin sqlpage/sqlpage.json sqlpage/migrations sqlpage/templates sqlpage/sqlpage.json;
mv 'sqlpage ubuntu-latest/sqlpage' sqlpage.bin;
tar --create --file sqlpage-linux.tgz --gzip sqlpage.bin sqlpage/migrations sqlpage/templates sqlpage/sqlpage.json;
mv 'sqlpage windows-latest/sqlpage.exe' .
zip -r sqlpage-windows.zip sqlpage.exe sqlpage/migrations sqlpage/templates sqlpage/sqlpage.json;
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
draft: false
prerelease: ${{ contains(github.ref_name, 'beta') }}
files: |
sqlpage-windows.zip
sqlpage-linux.tgz
sqlpage-macos.tgz
sqlpage aws lambda serverless image/sqlpage-aws-lambda.zip
cargo_publish:
name: Publish to crates.io
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Set up cargo cache
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
- name: Publish to crates.io
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}