2023-04-30 22:19:59 +00:00
|
|
|
name: release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
|
|
|
|
jobs:
|
2024-01-01 15:22:30 +00:00
|
|
|
create-release:
|
2023-04-30 22:19:59 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
2024-01-01 15:22:30 +00:00
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
2023-04-30 22:19:59 +00:00
|
|
|
steps:
|
|
|
|
- name: Create release
|
2024-01-01 15:22:30 +00:00
|
|
|
id: create-release
|
2023-04-30 22:19:59 +00:00
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
release_name: ${{ github.ref }}
|
|
|
|
draft: false
|
|
|
|
prerelease: false
|
|
|
|
|
2024-04-16 19:26:00 +00:00
|
|
|
deploy-releases:
|
2023-04-30 22:19:59 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2024-01-01 15:22:30 +00:00
|
|
|
needs: create-release
|
2023-04-30 22:19:59 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
2024-04-16 19:26:00 +00:00
|
|
|
- target: x86_64-linux
|
2023-04-30 22:19:59 +00:00
|
|
|
os: ubuntu-latest
|
2024-04-20 05:50:57 +00:00
|
|
|
- target: aarch64-linux
|
2024-01-01 15:22:30 +00:00
|
|
|
os: ubuntu-latest
|
2024-04-16 19:26:00 +00:00
|
|
|
- target: x86_64-windows
|
|
|
|
os: ubuntu-latest
|
2024-04-20 05:50:57 +00:00
|
|
|
- target: x86_64-darwin
|
2024-09-17 04:46:57 +00:00
|
|
|
os: macos-13
|
|
|
|
- target: aarch64-darwin
|
|
|
|
os: macos-14
|
2023-04-30 22:19:59 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Nix
|
2024-09-17 04:46:57 +00:00
|
|
|
uses: cachix/install-nix-action@v27
|
2023-04-30 22:19:59 +00:00
|
|
|
with:
|
2024-09-17 04:46:57 +00:00
|
|
|
nix_path: nixpkgs=channel:nixos-24.05
|
2023-04-30 22:19:59 +00:00
|
|
|
extra_nix_config: |
|
|
|
|
experimental-features = nix-command flakes
|
2024-09-17 04:46:57 +00:00
|
|
|
- uses: cachix/cachix-action@v15
|
2023-04-30 22:19:59 +00:00
|
|
|
with:
|
|
|
|
name: soywod
|
|
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
2024-04-16 19:26:00 +00:00
|
|
|
- name: Build release archive
|
2023-04-30 22:19:59 +00:00
|
|
|
run: |
|
2024-04-16 19:26:00 +00:00
|
|
|
nix build -L .#${{ matrix.target }}
|
2024-04-20 05:50:57 +00:00
|
|
|
cp result/himalaya* .
|
2024-04-16 19:26:00 +00:00
|
|
|
- name: Upload tgz release archive
|
2023-04-30 22:19:59 +00:00
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2024-01-01 15:22:30 +00:00
|
|
|
upload_url: ${{ needs.create-release.outputs.upload_url }}
|
2023-05-01 09:41:39 +00:00
|
|
|
asset_path: himalaya.tgz
|
2024-04-16 19:26:00 +00:00
|
|
|
asset_name: himalaya.${{ matrix.target }}.tgz
|
2023-04-30 22:19:59 +00:00
|
|
|
asset_content_type: application/gzip
|
2024-01-01 15:22:30 +00:00
|
|
|
- name: Upload zip release archive
|
2023-04-30 22:19:59 +00:00
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2024-01-01 15:22:30 +00:00
|
|
|
upload_url: ${{ needs.create-release.outputs.upload_url }}
|
2023-04-30 22:19:59 +00:00
|
|
|
asset_path: himalaya.zip
|
2024-04-16 19:26:00 +00:00
|
|
|
asset_name: himalaya.${{ matrix.target }}.zip
|
2023-04-30 22:19:59 +00:00
|
|
|
asset_content_type: application/zip
|