feat: Arrays #162
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: Package | |
on: | |
push: | |
branches: | |
- master | |
- dev-workflow | |
pull_request: | |
release: | |
types: [published] | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
metadata: | |
name: Get metadata | |
runs-on: ubuntu-22.04 | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | |
- name: Version | |
id: version | |
run: | | |
if ${{ startsWith(github.ref, 'refs/tags/') }}; then | |
echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" | |
else | |
echo "version=devel" >> "$GITHUB_OUTPUT" | |
fi | |
binary: | |
name: Build binary | |
runs-on: ubuntu-22.04 | |
needs: metadata | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | |
- name: Install Nix | |
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v28 | |
- name: Build | |
run: nix-shell --run 'build_release' | |
- name: Archive binary | |
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | |
with: | |
name: filc-${{ needs.metadata.outputs.version }} | |
path: ${{ github.workspace }}/filc | |
debian: | |
name: Build debian package | |
runs-on: ubuntu-22.04 | |
needs: metadata | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | |
- name: Install Nix | |
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v28 | |
- name: Build | |
run: nix-shell --run 'build_deb_package' | |
- name: Archive package | |
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | |
with: | |
name: filc-${{ needs.metadata.outputs.version }}_deb | |
path: | | |
${{ github.workspace }}/out/deb_package/*.deb | |
${{ github.workspace }}/out/deb_package/*.deb.sha512 | |
- name: Upload to release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
uses: xresloader/upload-to-github-release@26f7cc1d7d924dc9b6d5008808be8278b7177811 # v1.6.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
file: "${{ github.workspace }}/out/deb_package/*.deb;${{ github.workspace }}/out/deb_package/*.deb.sha512" | |
tags: true | |
rpm: | |
name: Build rpm package | |
runs-on: ubuntu-22.04 | |
needs: metadata | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | |
- name: Install Nix | |
uses: cachix/install-nix-action@3715ab1a11cac9e991980d7b4a28d80c7ebdd8f9 # v28 | |
- name: Build | |
run: nix-shell --run 'build_rpm_package' | |
- name: Archive package | |
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | |
with: | |
name: filc-${{ needs.metadata.outputs.version }}_rpm | |
path: | | |
${{ github.workspace }}/out/rpm_package/*.rpm | |
${{ github.workspace }}/out/rpm_package/*.rpm.sha512 | |
- name: Upload to release | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
uses: xresloader/upload-to-github-release@26f7cc1d7d924dc9b6d5008808be8278b7177811 # v1.6.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
file: "${{ github.workspace }}/out/rpm_package/*.rpm;${{ github.workspace }}/out/rpm_package/*.rpm.sha512" | |
tags: true |