Skip to content

Commit

Permalink
Add install script
Browse files Browse the repository at this point in the history
  • Loading branch information
waybackarchiver committed Mar 19, 2022
1 parent 6523dcf commit 7c5636f
Show file tree
Hide file tree
Showing 4 changed files with 429 additions and 6 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ jobs:
snapcraft:
name: Build Snap
runs-on: ubuntu-latest
outputs:
version: ${{ steps.env.outputs.version }}
steps:
- name: Check out code base
uses: actions/checkout@v3
Expand All @@ -218,13 +220,15 @@ jobs:

- name: Set env & Print wayback version
shell: bash
id: env
run: |
version=$(git describe --tags `git rev-list --tags --max-count=1` | sed -e 's/v//g')
sed -i "s/version: 'git'/version: '${version}'/g" snapcraft.yaml
echo "::set-output name=version::${version}"
- id: build
name: Build Snap
uses: snapcore/action-publish@v1
uses: snapcore/action-build@v1
with:
snapcraft-channel: stable

Expand Down Expand Up @@ -295,9 +299,18 @@ jobs:
id: digest
run: |
digest=$(find *${{ env.PRODUCT }}* -type f -exec sha256sum {} +)
digest="${digest//$'%'/%25}"
digest="${digest//$'\n'/%0A}"
echo "::set-output name=result::$digest"
output="${digest//$'%'/%25}"
output="${output//$'\n'/%0A}"
echo "::set-output name=result::$output"
# Write digest to file
version=${{ needs.snapcraft.outputs.version }}
echo "${digest}" > "${{ env.PRODUCT }}-${version}-checksums.txt"
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.PRODUCT }}
path: ${{ env.PRODUCT }}-*-checksums.txt

release:
name: Create and upload release
Expand Down
1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ header:
- 'wayback.1'
- 'wayback.conf'
- 'docker-bake.hcl'
- 'install.sh'
- 'Makefile'
- 'Procfile'

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ From source:
go get -u github.com/wabarc/wayback/cmd/wayback
```

From [GoBinaries](https://gobinaries.com/):
From GitHub Releases:

```sh
curl -sf https://gobinaries.com/wabarc/wayback/cmd/wayback | sh
sh <(wget https://github.com/wabarc/wayback/raw/main/install.sh -O-)
```

Using [Snapcraft](https://snapcraft.io/wayback) (on GNU/Linux)
Expand Down
Loading

0 comments on commit 7c5636f

Please sign in to comment.