1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-14 06:32:36 +01:00
server/.github/workflows/release.yml

89 lines
3.0 KiB
YAML
Raw Normal View History

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
2021-07-11 11:05:09 +02:00
build: npm run bundle:windows
artifact: fosscord-api-windows.exe
2021-07-11 09:09:37 +02:00
- os: macos
2021-07-11 11:05:09 +02:00
build: npm run bundle:macos
artifact: fosscord-api-macos.app.tgz
2021-07-11 09:09:37 +02:00
- os: ubuntu
2021-07-11 11:05:09 +02:00
build: npm run bundle:linux
artifact: fosscord-api-linux.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
2021-07-11 09:19:46 +02:00
- uses: actions/setup-node@v2
2021-07-11 09:09:37 +02:00
with:
node-version: 14
2021-07-11 09:19:46 +02:00
- run: npm install
- run: npm run build
- run: ${{ matrix.build }}
2021-07-11 09:09:37 +02:00
- 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 10:11:18 +02:00
- uses: actions/checkout@v2
- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@v1.0.6
2021-07-11 09:09:37 +02:00
- uses: actions/download-artifact@v2
with:
2021-07-11 10:01:27 +02:00
name: fosscord-api-windows-${{ github.sha }}.exe
2021-07-11 09:09:37 +02:00
- uses: actions/download-artifact@v2
with:
2021-07-11 10:01:27 +02:00
name: fosscord-api-macos-${{ github.sha }}.app.tgz
- uses: actions/download-artifact@v2
with:
2021-07-11 10:06:04 +02:00
name: fosscord-api-linux-${{ github.sha }}.tgz
2021-07-11 09:09:37 +02:00
- 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:44:32 +02:00
tag_name: v${{ steps.extract_version.outputs.version }}
release_name: Release ${{ steps.extract_version.outputs.version }}
2021-07-16 16:16:10 +02:00
draft: false
2021-07-11 09:44:32 +02:00
prerelease: true # TODO: change this to false
2021-07-11 09:09:37 +02:00
- 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 }}
2021-07-11 10:01:27 +02:00
asset_path: fosscord-api-windows-${{ github.sha }}.exe
2021-07-11 09:53:19 +02:00
asset_name: fosscord-api-windows.exe
2021-07-11 09:09:37 +02:00
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 }}
2021-07-11 10:01:27 +02:00
asset_path: fosscord-api-macos-${{ github.sha }}.app.tgz
2021-07-11 09:53:19 +02:00
asset_name: fosscord-api-macos.app.tgz
2021-07-11 09:09:37 +02:00
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 }}
2021-07-11 10:01:27 +02:00
asset_path: fosscord-api-linux-${{ github.sha }}.tgz
2021-07-11 09:53:19 +02:00
asset_name: fosscord-api-linux.tgz
2021-07-11 09:09:37 +02:00
asset_content_type: application/gzip