diff --git a/.github/workflows/publish-manifest.yml b/.github/workflows/publish-manifest.yml new file mode 100644 index 0000000000..28e75570f4 --- /dev/null +++ b/.github/workflows/publish-manifest.yml @@ -0,0 +1,35 @@ +name: Publish manifest + +on: + push: + branches: + - master + +jobs: + publish-manifest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install shfmt + run: go install mvdan.cc/sh/v3/cmd/shfmt@latest + - name: Generate + run: | + shellcheck --shell=sh public/install/*.sh --exclude SC2039,SC2154,SC2034 + ~/go/bin/shfmt -d -p -i 4 -ci -bn -s public/install/*.sh + sed -i "s/@revision@/${GITHUB_SHA}/" public/install/999_footer.sh + mkdir _out + cat public/install/*.sh > _out/install.sh + sed -i " + /#!.*/p + /##.*/p + /^ *$/d + /^ *#/d + s/ *#.*// + " _out/install.sh + cp public/manifest.json _out/manifest.json + - name: Upload Artifacts + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + single_commit: yes + branch: public-manifest + folder: _out/