2021-07-11 09:11:48 +02:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
# Sequence of patterns matched against refs/tags
|
|
|
|
tags:
|
|
|
|
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
|
|
|
|
|
|
name: Publish Release
|
|
|
|
|
2021-07-10 19:01:53 +02:00
|
|
|
jobs:
|
2021-07-11 09:09:37 +02:00
|
|
|
insiders-build:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-07-11 09:11:48 +02:00
|
|
|
os: [windows, macos, ubuntu]
|
2021-07-11 09:09:37 +02:00
|
|
|
include:
|
|
|
|
- os: windows
|
|
|
|
build: npx caxa --directory . --command "{{caxa}}/node_modules/.bin/node" "{{caxa}}/lib/index.js" --output "Fosscord-server-windows-${{ github.sha }}.exe"
|
|
|
|
artifact: Fosscord-server-windows-${{ github.sha }}.exe
|
|
|
|
- os: macos
|
|
|
|
build: |
|
|
|
|
npx caxa --directory . --command "{{caxa}}/node_modules/.bin/node" "{{caxa}}/lib/index.js" --output "Fosscord.app"
|
|
|
|
tar -czf "Fosscord--server-macos-${{ github.sha }}.app.tgz" "Fosscord.app"
|
|
|
|
artifact: Fosscord--server-macos-${{ github.sha }}.app.tgz
|
|
|
|
- os: ubuntu
|
|
|
|
build: |
|
|
|
|
npx caxa --directory . --command "{{caxa}}/node_modules/.bin/node" "{{caxa}}/lib/index.js" --output "fosscord"
|
|
|
|
tar -czf "fosscord-server-linux-${{ github.sha }}.tgz" "fosscord"
|
|
|
|
artifact: fosscord-server-linux-${{ github.sha }}.tgz
|
2021-07-11 09:11:48 +02:00
|
|
|
runs-on: ${{ matrix.os }}-latest
|
2021-07-11 09:09:37 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 15
|
|
|
|
- run: |
|
|
|
|
npm i
|
|
|
|
npm run build
|
|
|
|
${{ matrix.build }}
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.artifact }}
|
|
|
|
path: ${{ matrix.artifact }}
|
|
|
|
|
|
|
|
release:
|
|
|
|
needs: [insiders-build]
|
2021-07-10 19:01:53 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-07-11 09:09:37 +02:00
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Fosscord-windows-${{ github.sha }}.exe
|
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Fosscord-macos-${{ github.sha }}.app.tgz
|
|
|
|
- uses: actions/download-artifact@v2
|
2021-07-10 19:01:53 +02:00
|
|
|
with:
|
2021-07-11 09:09:37 +02:00
|
|
|
name: Fosscord-linux-${{ github.sha }}.tgz
|
|
|
|
- run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
|
|
|
|
id: tag
|
|
|
|
- uses: actions/create-release@v1
|
|
|
|
id: create-release
|
2021-07-10 19:01:53 +02:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2021-07-11 09:09:37 +02:00
|
|
|
tag_name: ${{ steps.tag.outputs.tag }}
|
|
|
|
release_name: Release ${{ steps.tag.outputs.tag }}
|
|
|
|
- uses: actions/upload-release-asset@v1
|
2021-07-11 07:56:20 +02:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2021-07-11 09:09:37 +02:00
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
|
|
asset_path: Fosscord-windows-${{ github.sha }}.exe
|
|
|
|
asset_name: Fosscord-windows-${{ steps.tag.outputs.tag }}.exe
|
|
|
|
asset_content_type: application/vnd.microsoft.portable-executable
|
|
|
|
- uses: actions/upload-release-asset@v1
|
2021-07-11 07:56:20 +02:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2021-07-11 09:09:37 +02:00
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
|
|
asset_path: Fosscord-macos-${{ github.sha }}.app.tgz
|
|
|
|
asset_name: Fosscord-macos-${{ steps.tag.outputs.tag }}.app.tgz
|
|
|
|
asset_content_type: application/gzip
|
|
|
|
- uses: actions/upload-release-asset@v1
|
2021-07-11 07:56:20 +02:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2021-07-11 09:09:37 +02:00
|
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
|
|
asset_path: Fosscord-linux-${{ github.sha }}.tgz
|
|
|
|
asset_name: Fosscord-linux-${{ steps.tag.outputs.tag }}.tgz
|
|
|
|
asset_content_type: application/gzip
|