|
1 |
| -name: release |
| 1 | +name: Release builds |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | release:
|
5 | 5 | types: [ published ]
|
6 |
| -permissions: write-all |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: write |
7 | 9 |
|
8 | 10 | jobs:
|
9 | 11 | release:
|
@@ -67,32 +69,64 @@ jobs:
|
67 | 69 | files: build/compress/*
|
68 | 70 | prerelease: false
|
69 | 71 |
|
| 72 | + release-lite: |
| 73 | + strategy: |
| 74 | + matrix: |
| 75 | + platform: [ ubuntu-latest ] |
| 76 | + go-version: [ '1.21' ] |
| 77 | + name: Release Lite |
| 78 | + runs-on: ${{ matrix.platform }} |
| 79 | + steps: |
| 80 | + |
| 81 | + - name: Free Disk Space (Ubuntu) |
| 82 | + uses: jlumbroso/free-disk-space@main |
| 83 | + with: |
| 84 | + # this might remove tools that are actually needed, |
| 85 | + # if set to "true" but frees about 6 GB |
| 86 | + tool-cache: false |
| 87 | + |
| 88 | + # all of these default to true, but feel free to set to |
| 89 | + # "false" if necessary for your workflow |
| 90 | + android: true |
| 91 | + dotnet: true |
| 92 | + haskell: true |
| 93 | + large-packages: true |
| 94 | + docker-images: true |
| 95 | + swap-storage: true |
| 96 | + |
| 97 | + - name: Prerelease |
| 98 | + |
| 99 | + with: |
| 100 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 101 | + id: ${{ github.event.release.id }} |
| 102 | + prerelease: true |
| 103 | + |
| 104 | + - name: Setup Go |
| 105 | + uses: actions/setup-go@v5 |
| 106 | + with: |
| 107 | + go-version: ${{ matrix.go-version }} |
| 108 | + |
| 109 | + - name: Checkout |
| 110 | + uses: actions/checkout@v4 |
| 111 | + with: |
| 112 | + fetch-depth: 0 |
| 113 | + |
| 114 | + - name: Install dependencies |
| 115 | + run: | |
| 116 | + sudo snap install zig --classic --beta |
| 117 | + docker pull crazymax/xgo:latest |
| 118 | + go install github.com/crazy-max/xgo@latest |
| 119 | + sudo apt install upx |
| 120 | +
|
| 121 | + - name: Build |
| 122 | + run: | |
| 123 | + bash build.sh release lite |
| 124 | + env: |
| 125 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 126 | + |
| 127 | + - name: Upload assets |
| 128 | + uses: softprops/action-gh-release@v2 |
| 129 | + with: |
| 130 | + files: build/compress/* |
| 131 | + prerelease: false |
70 | 132 |
|
71 |
| - # TODO: We do not have desktop clients right now. We may need a better way to |
72 |
| - # trigger the build of desktop client when we actually have it. |
73 |
| - # release_desktop: |
74 |
| - # needs: release |
75 |
| - # name: Release desktop |
76 |
| - # runs-on: ubuntu-latest |
77 |
| - # steps: |
78 |
| - # - name: Checkout repo |
79 |
| - # uses: actions/checkout@v4 |
80 |
| - # with: |
81 |
| - # repository: openlistteam/desktop-release |
82 |
| - # ref: main |
83 |
| - # persist-credentials: false |
84 |
| - # fetch-depth: 0 |
85 |
| - |
86 |
| - # - name: Add tag |
87 |
| - # run: | |
88 |
| - # git config --local user.email "[email protected]" |
89 |
| - # git config --local user.name "IlaBot" |
90 |
| - # version=$(wget -qO- -t1 -T2 "https://api.github.com/repos/openlistteam/openlist/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g') |
91 |
| - # git tag -a $version -m "release $version" |
92 |
| - |
93 |
| - # - name: Push tags |
94 |
| - # uses: ad-m/github-push-action@master |
95 |
| - # with: |
96 |
| - # github_token: ${{ secrets.MY_TOKEN }} |
97 |
| - # branch: main |
98 |
| - # repository: openlistteam/desktop-release |
|
0 commit comments