Skip to content

Update README.md

Update README.md #269

# This is a basic workflow to help you get started with Actions
name: Build-Linux-x86_64
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, unstable ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: "recursive"
#- name: Cache
# uses: actions/[email protected]
# with:
# path: mozilla-unified
# key: ${{ runner.os }}-mozilla-unified
- name: Free up space on runner
run: |
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
# Runs a set of commands using the runners shell
- name: Get deps, build and package
run: |
ls
sudo apt upgrade && sudo apt update
sudo add-apt-repository universe
sudo apt install libfuse2
sudo apt-get install python3 python3-distutils python3-pip build-essential libpython3-dev m4 nodejs unzip uuid zip libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdbus-glib-1-dev libdrm-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb rustc clang nasm
pip3 install --upgrade setuptools
pip3 install wheel setuptools zstandard==0.15.2 cffi>=1.13.0 glean-parser==2.5.0 appdirs>=1.4 Click>=7 diskcache>=4 importlib-metadata iso8601>=0.1.10 Jinja2>=2.10.1 jsonschema>=3.0.2 attrs>=17.4.0 MarkupSafe>=2.0 pycparser pyrsistent>=0.14.0 PyYAML>=3.13 six>=1.11.0 typing-extensions>=3.6.4 yamllint>=1.18.0 pathspec>=0.5.3 zipp>=0.5 psutil==5.8.0
mkdir ~/.mozbuild
git clone https://github.com/glandium/git-cinnabar.git ~/.mozbuild/git-cinnabar
datcorddir=$PWD
cd ~/.mozbuild/git-cinnabar/
make
ls
cd $datcorddir
bash ./buildDatcord.sh
# - name: Edit Tarball
# run: |
# mkdir datcord
# tar --strip-components=1 -xvf mozilla-unified/obj-x86_64-pc-linux-gnu/dist/*.tar.bz2 -C datcord/
# #mv datcord/firefox datcord/datcord
# #mv datcord/firefox-bin datcord/datcord-bin
# cp -r distribution/ datcord/
# mv datcord/distribution/policies-linux.json datcord/distribution/policies.json
# cp open-in-default-browser/open-in-default-browser datcord/open-in-default-browser
# cp src/launch-datcord datcord/launch-datcord
# tar -cjf datcord.tar.bz2 datcord
- name: Appimage it
run: |
cd packages/appimage
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod a+x appimagetool-x86_64.AppImage
mkdir -p datcord.AppImage/usr/bin/
tar --strip-components=1 -xvf ../../mozilla-unified/obj-x86_64-pc-linux-gnu/dist/*.tar.bz2 -C datcord.AppImage/usr/bin/
#mv datcord.AppImage/usr/bin/firefox datcord.AppImage/usr/bin/datcord
#mv datcord.AppImage/usr/bin/firefox-bin datcord.AppImage/usr/bin/datcord-bin
cp -r ../../distribution/ datcord.AppImage/usr/bin/
mv datcord.AppImage/usr/bin/distribution/policies-linux-appimage.json datcord.AppImage/usr/bin/distribution/policies.json
cp ../../open-in-default-browser/open-in-default-browser datcord.AppImage/usr/bin/
ARCH=x86_64 ./appimagetool-x86_64.AppImage datcord.AppImage/
cd ../..
# - name: Flatpak it
# run: |
# cd packages/flatpak
# chmod +x mkflatpak.sh
# ./mkflatpak.sh
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
# Artifact name
name: tarball-linux-x86_64
# A file, directory or wildcard pattern that describes what to upload
path: datcord.tar.bz2
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
# Artifact name
name: Appimage
# A file, directory or wildcard pattern that describes what to upload
path: |
packages/appimage/Datcord-x86_64.AppImage