chore: 🤖 NEXTAUTH_URL #108
Workflow file for this run
This file contains 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: Release | |
permissions: | |
contents: write | |
on: | |
push: | |
tags: | |
- v[0-9]+.* | |
jobs: | |
# build: | |
# name: release ${{ matrix.target }} | |
# runs-on: ubuntu-latest | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# target: | |
# [ | |
# x86_64-pc-windows-gnu, | |
# x86_64-unknown-linux-musl | |
# ] | |
# package: [web, deploy] | |
# steps: | |
# - uses: actions/checkout@master | |
# - name: Compile and release | |
# id: compile | |
# uses: rust-build/rust-build.action@v1.3.2 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# RUSTTARGET: ${{ matrix.target }} | |
# SRC_DIR: ${{ matrix.package }} | |
# ARCHIVE_NAME: serverbee-${{ matrix.package }}-${{ matrix.target }} | |
# UPLOAD_MODE: none | |
# - name: Upload artifact | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: serverbee-${{ matrix.target }} | |
# path: | | |
# ${{ steps.compile.outputs.BUILT_ARCHIVE }} | |
# ${{ steps.compile.outputs.BUILT_CHECKSUM }} | |
build-view: | |
name: Build View | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install dependencies and build | |
run: | | |
pnpm -C apps/view install | |
pnpm -C apps/view build | |
- name: Upload view build artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: view-build-artifacts | |
path: apps/view/dist | |
build: | |
needs: | |
- build-view | |
strategy: | |
fail-fast: false | |
matrix: | |
package: [ web, deploy ] | |
settings: | |
- host: macos-latest | |
target: x86_64-apple-darwin | |
- host: macos-latest | |
target: aarch64-apple-darwin | |
- host: ubuntu-latest | |
suffix: .exe | |
target: x86_64-pc-windows-gnu | |
- host: windows-latest | |
suffix: .exe | |
target: x86_64-pc-windows-msvc | |
args: --no-default-features --features native-tls | |
# https://github.com/briansmith/ring/issues/1614 | |
# - host: windows-latest | |
# suffix: .exe | |
# target: aarch64-pc-windows-msvc | |
# args: --no-default-features --features native-tls | |
- host: ubuntu-latest | |
target: x86_64-unknown-linux-musl | |
- host: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
- host: ubuntu-latest | |
target: aarch64-unknown-linux-gnu | |
- host: ubuntu-latest | |
target: aarch64-unknown-linux-musl | |
name: build serverbee-${{ matrix.package }}-${{ matrix.settings.target }} | |
runs-on: ${{ matrix.settings.host }} | |
steps: | |
- uses: actions/checkout@master | |
- name: Download view build artifacts | |
uses: actions/download-artifact@v2 | |
if: matrix.package == 'web' | |
with: | |
name: view-build-artifacts | |
path: apps/view/dist | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
target: ${{ matrix.settings.target }} | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --release --bin serverbee-${{ matrix.package }} --target ${{ matrix.settings.target }} ${{ matrix.settings.args }} | |
- name: Archive Release | |
uses: thedoctor0/zip-release@main | |
with: | |
type: 'zip' | |
directory: ./target/${{ matrix.settings.target }}/release | |
path: serverbee-${{ matrix.package }}${{ matrix.settings.suffix }} | |
filename: serverbee-${{ matrix.package }}-${{ matrix.settings.target }}.zip | |
# - name: Display structure of Upload files | |
# run: ls -R | |
# - name: Upload to R2 | |
# uses: randomairborne/r2-release@main | |
# with: | |
# endpoint: ${{ secrets.S3_ENDPOINT }} | |
# accesskeyid: ${{ secrets.S3_ACCESS_KEY_ID }} | |
# secretaccesskey: ${{ secrets.S3_SECRET_ACCESS_KEY }} | |
# bucket: serverbee | |
# file: ./target/${{ matrix.settings.target }}/release/serverbee-${{ matrix.package }}-${{ matrix.settings.target }}.zip | |
# destination: cli/${{ github.ref_name }}/serverbee-${{ matrix.package }}-${{ matrix.settings.target }}.zip | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: serverbee-release | |
path: ./target/${{ matrix.settings.target }}/release/serverbee-${{ matrix.package }}-${{ matrix.settings.target }}.zip | |
upload-to-r2: | |
name: Upload Release to R2 | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: serverbee-release | |
path: release | |
- name: Display structure of Upload files | |
run: ls -R | |
- uses: ryand56/r2-upload-action@latest | |
with: | |
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
r2-access-key-id: ${{ secrets.S3_ACCESS_KEY_ID }} | |
r2-secret-access-key: ${{ secrets.S3_SECRET_ACCESS_KEY }} | |
r2-bucket: serverbee | |
source-dir: release | |
destination-dir: cli/${{ github.ref_name }} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- uses: actions/download-artifact@v3 | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: 'serverbee-*/*.zip' | |
prerelease: true | |
token: ${{ secrets.GITHUB_TOKEN }} |