Skip to content

fix(ci): migration issues #10

fix(ci): migration issues

fix(ci): migration issues #10

Workflow file for this run

on:
push:
tags:
- '*'
name: release
jobs:
quickcheck:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.rustversion.outputs.rustversion }}
steps:
- uses: actions/checkout@v4
- run: cargo check
- run: cargo pkgid
- run: 'echo "$(cargo pkgid | cut -d# -f2)"'
- id: rustversion
run: echo "rustversion=$(cargo pkgid | cut -d# -f2)" >> $GITHUB_OUTPUT
build:
needs: quickcheck
name: 'build-${{matrix.os}}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: build
run: cargo build --verbose
- name: run tests
run: cargo test --verbose
debbuild:
needs: [build, quickcheck]
runs-on: ubuntu-latest
name: build amd64 deb package
steps:
- uses: actions/checkout@v4
- name: build deb package
id: debbuild
uses: novalabsxyz/[email protected]
with:
toml_path: .
- name: upload deb artifact
uses: actions/upload-artifact@v4
with:
name: amd64deb
path: ./target/x86_64-unknown-linux-musl/debian/*
overwrite: true
macosbuild:
needs: [build, quickcheck]
runs-on: macos-latest
name: build macos package
steps:
- uses: actions/checkout@v4
- name: build
run: cargo build --release
- name: zip up macos binaries
run: 'zip -j sqliters_${{needs.quickcheck.outputs.version}}_macos.zip ./target/release/sqliters ./target/release/sqliters'
- name: upload macos artifact
uses: actions/upload-artifact@v4
with:
name: macos
path: 'sqliters_${{needs.quickcheck.outputs.version}}_macos.zip'
overwrite: true
windowsbuild:
needs: [build, quickcheck]
runs-on: windows-latest
name: build windows package
steps:
- uses: actions/checkout@v4
- name: build
run: cargo build --release
- name: zip up windows binaries
run: Compress-Archive -Path target\release\sqliters.exe -Destination sqliters_${{needs.quickcheck.outputs.version}}_windows.zip
- name: upload windows artifact
uses: actions/upload-artifact@v4
with:
name: windows
path: 'sqliters_${{needs.quickcheck.outputs.version}}_windows.zip'
overwrite: true
amd64binaries:
needs: [build, quickcheck]
runs-on: ubuntu-latest
name: build amd64 static binaries
steps:
- uses: actions/checkout@v4
- name: static binary build
id: amd64staticbuild
uses: novalabsxyz/[email protected]
with:
toml_path: .
cmd: cargo build --release --target=x86_64-unknown-linux-musl
- name: upload daemon artifact
uses: actions/upload-artifact@v4
with:
name: amd64binaries
path: ./target/x86_64-unknown-linux-musl/release/sqliters
overwrite: true
- name: upload sqliters artifact
uses: actions/upload-artifact@v4
with:
name: amd64binaries
path: ./target/x86_64-unknown-linux-musl/release/sqliters
overwrite: true
- run: 'zip -j amd64binaries.zip ./target/x86_64-unknown-linux-musl/release/sqliters ./target/x86_64-unknown-linux-musl/release/sqliters'
- name: upload zip artifact
uses: actions/upload-artifact@v4
with:
name: amd64binaries
path: amd64binaries.zip
overwrite: true
update_release_draft:
needs: [quickcheck, amd64binaries, macosbuild, debbuild, windowsbuild]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: '${{ needs.quickcheck.outputs.version }}'
release_name: Release ${{ needs.quickcheck.outputs.version }}
body: 'Change Me'
draft: true
prerelease: false
- uses: actions/download-artifact@v4
- name: upload amd64 deb release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./amd64deb/sqliters_${{needs.quickcheck.outputs.version}}_amd64.deb
asset_name: 'sqliters_${{needs.quickcheck.outputs.version}}_amd64.deb'
asset_content_type: application/vnd.debian.binary-package
- name: upload macos release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./macos/sqliters_${{needs.quickcheck.outputs.version}}_macos.zip
asset_name: 'sqliters_${{needs.quickcheck.outputs.version}}_macos.zip'
asset_content_type: application/zip
- name: upload windows release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./windows/sqliters_${{needs.quickcheck.outputs.version}}_windows.zip
asset_name: 'sqliters_${{needs.quickcheck.outputs.version}}_windows.zip'
asset_content_type: application/zip
- name: upload amd64 static binary zip release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./amd64binaries/amd64binaries.zip
asset_name: 'sqliters_${{needs.quickcheck.outputs.version}}_linux_amd64_binaries.zip'
asset_content_type: application/zip