name: Linux on: pull_request: push: release: types: [published] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: submodules: true - name: prepare local xmake run: cp -rf . ../xmake-source - uses: xmake-io/github-action-setup-xmake@v1 with: xmake-version: local#../xmake-source - uses: dlang-community/setup-dlang@v1 with: compiler: dmd-latest - uses: little-core-labs/get-git-tag@v3.0.2 id: tagName # tests - name: tests run: | xmake lua -v -D tests/run.lua xrepo --version # build artifacts - name: artifact run: | sudo apt install -y ruby ruby-dev rubygems build-essential sudo gem install --no-document fpm scripts/makepkg deb # upload artifacts - uses: actions/upload-artifact@v2 with: name: xmake-latest.amd64.deb path: artifacts/xmake.deb # publish release - name: publish if: github.event.action == 'published' uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ github.event.release.upload_url }} asset_path: artifacts/xmake.deb asset_name: xmake-${{ steps.tagName.outputs.tag }}.amd64.deb asset_content_type: application/zip - name: publish if: github.event.action == 'published' env: PPA_GPG_PRIKEY_2C0C68C9: ${{ secrets.PPA_GPG_PRIKEY_2C0C68C9 }} run: | # upload ubuntu/ppa sudo apt install -y dh-make rng-tools devscripts lintian echo "$PPA_GPG_PRIKEY_2C0C68C9" > ppa_gpg.key gpg --import ppa_gpg.key scripts/makeppa groovy scripts/makeppa focal scripts/makeppa bionic scripts/makeppa xenial scripts/makeppa trusty scripts/makeppa precise