2021-07-11 09:11:48 +02:00
|
|
|
on:
|
2021-08-15 13:37:26 +02:00
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
# Sequence of patterns matched against refs/tags
|
|
|
|
tags:
|
|
|
|
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
|
2021-07-11 09:11:48 +02:00
|
|
|
|
|
|
|
name: Publish Release
|
|
|
|
|
2021-07-10 19:01:53 +02:00
|
|
|
jobs:
|
2021-08-15 13:37:26 +02:00
|
|
|
insiders-build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows, macos, ubuntu]
|
|
|
|
include:
|
|
|
|
- os: windows
|
2021-09-04 17:39:03 +02:00
|
|
|
file: fosscord-server-windows.exe
|
|
|
|
package: ""
|
2021-08-15 13:37:26 +02:00
|
|
|
artifact: fosscord-server-windows.exe
|
|
|
|
- os: macos
|
2021-09-04 17:39:03 +02:00
|
|
|
file: fosscord-server.app
|
|
|
|
package: tar -czf 'fosscord-server-macos.app.tgz' 'fosscord-server.app'
|
2021-08-15 13:37:26 +02:00
|
|
|
artifact: fosscord-server-macos.app.tgz
|
|
|
|
- os: ubuntu
|
2021-09-04 17:39:03 +02:00
|
|
|
file: fosscord
|
|
|
|
package: chmod +x fosscord && tar -czf 'fosscord-server-linux.tgz' 'fosscord'
|
2021-08-15 13:37:26 +02:00
|
|
|
artifact: fosscord-server-linux.tgz
|
|
|
|
runs-on: ${{ matrix.os }}-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
env:
|
|
|
|
MONGOMS_VERSION: 4.4.3
|
|
|
|
with:
|
|
|
|
node-version: 14
|
|
|
|
- run: |
|
2021-09-04 14:07:58 +02:00
|
|
|
npm config set ignore-scripts true
|
2021-08-15 23:07:56 +02:00
|
|
|
cd util
|
2021-08-17 19:01:36 +02:00
|
|
|
npm i
|
2021-08-17 18:56:52 +02:00
|
|
|
npm run build
|
2021-08-17 18:51:17 +02:00
|
|
|
npm pack
|
|
|
|
cd ../api
|
2021-09-04 14:07:58 +02:00
|
|
|
npm i ../util/
|
2021-08-17 18:56:52 +02:00
|
|
|
npm run build
|
2021-08-17 18:51:17 +02:00
|
|
|
npm pack
|
|
|
|
cd ../cdn
|
2021-09-04 14:07:58 +02:00
|
|
|
npm i ../util/
|
2021-08-17 18:56:52 +02:00
|
|
|
npm run build
|
2021-08-17 18:51:17 +02:00
|
|
|
npm pack
|
|
|
|
cd ../gateway
|
2021-09-04 14:07:58 +02:00
|
|
|
npm i ../util/
|
2021-08-17 18:56:52 +02:00
|
|
|
npm run build
|
2021-08-17 18:51:17 +02:00
|
|
|
npm pack
|
2021-08-15 23:07:56 +02:00
|
|
|
cd ../bundle
|
2021-09-04 17:39:03 +02:00
|
|
|
npm i ../cdn/fosscord-cdn-1.0.0.tgz ../gateway/fosscord-gateway-1.0.0.tgz ../api/fosscord-api-1.0.0.tgz ../util/fosscord-util-1.0.0.tgz caxa
|
2021-08-17 18:56:52 +02:00
|
|
|
npm run build:bundle
|
2021-09-04 17:39:03 +02:00
|
|
|
npx caxa -i . -m 'This_may_take_a_while_to_run_the_first_time_please_wait...' --output '${{matrix.file}}' -- '{{caxa}}/node_modules/.bin/node' '{{caxa}}/dist/start.js'
|
|
|
|
${{ matrix.package }}
|
2021-08-15 13:37:26 +02:00
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.artifact }}
|
|
|
|
path: bundle/${{ matrix.artifact }}
|
2021-07-11 09:09:37 +02:00
|
|
|
|
2021-08-15 13:37:26 +02:00
|
|
|
release:
|
|
|
|
needs: [insiders-build]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: fosscord-server-windows.exe
|
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: fosscord-server-macos.app.tgz
|
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: fosscord-server-linux.tgz
|
|
|
|
- uses: actions/create-release@v1
|
|
|
|
id: create-release
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2021-08-17 20:44:52 +02:00
|
|
|
tag_name: v${{ secrets.RELEASE_VERSION }}
|
|
|
|
release_name: Server v${{ secrets.RELEASE_VERSION }}
|
2021-08-15 13:37:26 +02:00
|
|
|
draft: false
|
|
|
|
prerelease: true # TODO: change this to false
|
|
|
|
body: >
|
|
|
|
## Download
|
2021-08-13 12:58:18 +02:00
|
|
|
|
2021-08-17 20:44:52 +02:00
|
|
|
- [Windows](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-windows.exe)
|
2021-08-13 12:58:18 +02:00
|
|
|
|
2021-08-17 20:44:52 +02:00
|
|
|
- [MacOS](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-macos.app.tgz)
|
2021-08-13 12:58:18 +02:00
|
|
|
|
2021-08-17 20:44:52 +02:00
|
|
|
- [Linux](https://github.com/fosscord/fosscord-server/releases/download/v${{ secrets.RELEASE_VERSION }}/fosscord-server-linux.tgz)
|
2021-08-13 12:58:18 +02:00
|
|
|
|
2021-08-15 13:37:26 +02:00
|
|
|
- uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
|
|
asset_path: fosscord-server-windows.exe
|
|
|
|
asset_name: fosscord-server-windows.exe
|
|
|
|
asset_content_type: application/vnd.microsoft.portable-executable
|
|
|
|
- uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
|
|
asset_path: fosscord-server-macos.app.tgz
|
|
|
|
asset_name: fosscord-server-macos.app.tgz
|
|
|
|
asset_content_type: application/gzip
|
|
|
|
- uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
|
|
asset_path: fosscord-server-linux.tgz
|
|
|
|
asset_name: fosscord-server-linux.tgz
|
|
|
|
asset_content_type: application/gzip
|