summaryrefslogtreecommitdiff
path: root/.gitea/workflows/deploy.yaml
blob: 400464bd6f3e22fafe7f503b055e849569a90f16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Deploy

on:
  push:
    tags:
      - '**'

jobs:
  release:
    runs-on: buildenv
    steps:
      - name: Set up environment
        run: |
          apt-get update -y
          apt-get upgrade -y
          apt-get install -y pkg-config liblzma-dev
      - uses: actions/checkout@v4
      - run: cabal update
      - run: cabal build
      - name: Archive
        run: |
          DISTRIBUTION=$(echo $GITHUB_REF_NAME | awk '{ gsub(/^v/, "slackbuilder-"); print $0 }')
          cabal install --installdir=$DISTRIBUTION/bin --install-method=copy
          strip $DISTRIBUTION/bin/slackbuilder
          tar Jcvf $DISTRIBUTION.tar.xz $DISTRIBUTION
      - uses: akkuman/gitea-release-action@v1
        with:
          files: "*.tar.xz"
          token: ${{ secrets.API_KEY }}