-
-
Save damencho/8c13613e491a1a4b58f109378b014d0c to your computer and use it in GitHub Desktop.
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: Build Jitsi Desktop | |
on: [push] | |
jobs: | |
job-create-release: | |
name: Creates release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set Version | |
run: echo ::set-env name=VERSION::$((GITHUB_RUN_NUMBER + 5624)) | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.VERSION }} | |
release_name: ${{ env.VERSION }} | |
draft: false | |
prerelease: false | |
- name: Create version artifact | |
shell: bash | |
run: echo $VERSION > version.txt | |
- name: Upload version result | |
uses: actions/upload-artifact@v1 | |
with: | |
name: version | |
path: version.txt | |
- name: Create upload_url artifact | |
shell: bash | |
run: echo "${{ steps.create_release.outputs.upload_url }}" > upload-url.txt | |
- name: Upload upload_url result | |
uses: actions/upload-artifact@v1 | |
with: | |
name: upload-url | |
path: upload-url.txt | |
- name: Print uploaded data | |
shell: bash | |
run: | | |
cat version.txt | |
cat upload-url.txt | |
job-debian-build: | |
name: Debian Build | |
runs-on: ubuntu-18.04 | |
needs: job-create-release | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Install dpkg tools | |
run: sudo apt-get install dpkg-dev debhelper javahelper | |
- name: Download version result | |
uses: actions/download-artifact@v1 | |
with: | |
name: version | |
- name: Download upload_url result | |
uses: actions/download-artifact@v1 | |
with: | |
name: upload-url | |
- shell: bash | |
run: | | |
version=`cat version/version.txt` | |
uploadURL=`cat upload-url/upload-url.txt` | |
echo ::set-env name=VERSION::$version | |
echo ::set-env name=UPLOADURL::$uploadURL | |
- name: Build with Ant | |
run: ant -noinput -buildfile build.xml -Dsplashscreen.enable=true -Dlabel=$VERSION -Dgoogle.api.client.id="${{ secrets.GOOGLE_API_CLIENT_ID }}" -Dgoogle.api.client.secret="${{ secrets.GOOGLE_API_CLIENT_SECRET }}" rebuild deb | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ env.UPLOADURL }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
asset_path: ./release/debian/jitsi_2.11.${{ env.VERSION }}-1_amd64.deb | |
asset_name: jitsi_2.11.${{ env.VERSION }}-1_amd64.deb | |
asset_content_type: application/octet-stream | |
# job-osx-build: | |
# name: MacOSX Build | |
# runs-on: macos-latest | |
# needs: job-create-release | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Set up JDK 1.8 | |
# uses: actions/setup-java@v1 | |
# with: | |
# java-version: 1.8 | |
# - name: Download version result | |
# uses: actions/download-artifact@v1 | |
# with: | |
# name: version | |
# - name: Download upload_url result | |
# uses: actions/download-artifact@v1 | |
# with: | |
# name: upload-url | |
# - shell: bash | |
# run: | | |
# version=`cat version/version.txt` | |
# uploadURL=`cat upload-url/upload-url.txt` | |
# echo ::set-env name=VERSION::$version | |
# echo ::set-env name=UPLOADURL::$uploadURL | |
# - name: Install ant | |
# run: brew install ant | |
# - name: Install jarbundler | |
# shell: bash | |
# run: | | |
# wget http://informagen.com/JarBundler/dist/jarbundler.zip | |
# unzip jarbundler.zip | |
# mkdir -p ~/.ant/lib | |
# cp jarbundler-2.3.1/jarbundler-2.3.1.jar ~/.ant/lib | |
# - name: Build with Ant | |
# run: ant -noinput -buildfile build.xml -Dsplashscreen.enable=true -Dlabel="$VERSION" -Dsparkle="$VERSION" -Dpackage.name="jitsi" -Dlink.updates.macosx="https://download.jitsi.org/jitsi/macosx/sparkle/updates.xml" -Dlink.download.macosx="https://download.jitsi.org/jitsi/nightly/macosx/jitsi-2.11.$VERSION.dmg" -Dlink.sparkle.updates.index="https://download.jitsi.org/jitsi/nightly/macosx/sparkle/index.html" -Dgoogle.api.client.id="${{ secrets.GOOGLE_API_CLIENT_ID }}" -Dgoogle.api.client.secret="${{ secrets.GOOGLE_API_CLIENT_SECRET }}" -Dmacosx.embed.jre.disabled="true" clean make dmg | |
# - shell: bash | |
# run: | | |
# ls -l release/macosx/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment