This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
chore: archive repo #124
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deployer | |
on: | |
repository_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
nightly: | |
name: Nightly Build | |
runs-on: ubuntu-latest | |
if: "github.event_name == 'push' && !contains(github.event.head_commit.message, '[REL]')" | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@master | |
- name: Gather Information | |
id: info | |
run: | | |
echo "::set-output name=timestamp::$(date +%s)" | |
echo "::set-output name=productName::$(node -p -e "require('./package.json').productName")" | |
echo "::set-output name=version::$(node -p -e "require('./package.json').version")" | |
- name: π | Install Dependencies | |
run: | | |
yarn install | |
yarn run dist | |
- name: π¦ | Building | |
run: yarn run build | |
- name: π¦ | Build AppImage | |
run: | | |
jq -c '.productName = "PreMiD Portable"' ./dist/app/package.json > tmp.$$.json && mv tmp.$$.json ./dist/app/package.json | |
yarn run build:n-appimage | |
- name: π·οΈ | Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
./dist/app/dist/${{ steps.info.outputs.productName }}.tar.gz | |
./dist/app/dist/${{ steps.info.outputs.productName }} Portable.AppImage | |
tag_name: v${{ steps.info.outputs.version }}-${{ steps.info.outputs.timestamp }} | |
name: Nightly v${{ steps.info.outputs.version }}-${{ steps.info.outputs.timestamp }} | |
draft: false | |
prerelease: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
stable: | |
name: Stable Build | |
runs-on: ubuntu-latest | |
if: "github.event_name == 'push' && contains(github.event.head_commit.message, '[REL]')" | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-node@master | |
- name: Gather Information | |
id: info | |
run: | | |
echo "::set-output name=productName::$(node -p -e "require('./package.json').productName")" | |
echo "::set-output name=version::$(node -p -e "require('./package.json').version")" | |
- name: π | Install Dependencies | |
run: | | |
yarn install | |
yarn run dist | |
- name: π¦ | Building | |
run: yarn run build | |
- name: π·οΈ | Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
./dist/app/dist/${{ steps.info.outputs.productName }}.tar.gz | |
tag_name: v${{ steps.info.outputs.version }} | |
name: Stable v${{ steps.info.outputs.version }} | |
draft: true | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7.2 | |
- name: Install packagecloud.io CLI | |
run: | | |
gem install package_cloud | |
- name: π¦ | Upload Debian packages | |
run: | | |
package_cloud push PreMiD/Linux/debian/wheezy ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/debian/jessie ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/debian/stretch ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/debian/buster ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/debian/bullseye ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/debian/bookworm ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/debian/trixie ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
env: | |
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} | |
- name: β‘οΈ | Upload Ubuntu packages | |
run: | | |
package_cloud push PreMiD/Linux/ubuntu/xenial ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/ubuntu/yakkety ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/ubuntu/bionic ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/ubuntu/cosmic ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/ubuntu/disco ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/ubuntu/focal ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/ubuntu/groovy ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/ubuntu/hirsute ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
package_cloud push PreMiD/Linux/ubuntu/impish ./dist/app/dist/${{ steps.info.outputs.productName }}.deb | |
env: | |
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} | |
- name: β‘οΈ | Upload RPM packages | |
run: | | |
package_cloud push PreMiD/Linux/el/5 ./dist/app/dist/${{ steps.info.outputs.productName }}.rpm | |
package_cloud push PreMiD/Linux/el/6 ./dist/app/dist/${{ steps.info.outputs.productName }}.rpm | |
package_cloud push PreMiD/Linux/el/7 ./dist/app/dist/${{ steps.info.outputs.productName }}.rpm | |
package_cloud push PreMiD/Linux/el/8 ./dist/app/dist/${{ steps.info.outputs.productName }}.rpm | |
package_cloud push PreMiD/Linux/fedora/32 ./dist/app/dist/${{ steps.info.outputs.productName }}.rpm | |
env: | |
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} | |
- name: β‘οΈ | Upload AppImage to Draft release | |
run: | | |
jq -c '.productName = "PreMiD Portable"' ./dist/app/package.json > tmp.$$.json && mv tmp.$$.json ./dist/app/package.json | |
yarn run build:appimage | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |