name: ci-build on: push: workflow_dispatch: jobs: build: name: Build runs-on: "ubuntu-latest" steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - run: | git fetch --force --tags - uses: actions/setup-go@v3 with: go-version: '1.19' check-latest: true cache: true - uses: awalsh128/cache-apt-pkgs-action@latest with: packages: git-crypt xxd version: 1.0 - name: decrypt if: ${{ !env.ACT }} run: | echo ${REPO_KEY} | xxd -r -p > ../bedrock-repo-key.key git-crypt unlock ../bedrock-repo-key.key rm ../bedrock-repo-key.key env: REPO_KEY: ${{ secrets.REPO_KEY }} - run: go install github.com/sanbornm/go-selfupdate/cmd/go-selfupdate - run: go get ./cmd/bedrocktool - name: Install SSH Key uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SSH_PRIVATE_KEY }} known_hosts: ${{ secrets.KNOWN_HOSTS }} - name: build id: build run: | make -j dists updates - name: Deploy with rsync run: rsync -avz ./public/ olebeck@${{ secrets.SSH_HOST }}:/var/www/updates/bedrocktool/ - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" files: dist/* prerelease: false