v1.5.25 #13
Workflow file for this run
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: 'Attach archive to release' | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
build: | |
name: release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
with: | |
submodules: true # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: 'Check out tag' | |
run: git checkout ${{ github.ref_name }} | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.87.0' # If you update this, also update it in scripts/install-hugo.sh | |
extended: true | |
- uses: actions/cache@v2 | |
with: | |
path: /tmp/hugo_cache | |
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-hugomod- | |
- name: Create website archive | |
run: hugo -b https://snoonet.org && tar -zcvf website-${{ github.ref_name }}.tar.gz public | |
- name: Attach archive to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: website-${{ github.ref_name }}.tar.gz | |
asset_name: website-${{ github.ref_name }}.tar.gz | |
overwrite: true | |
tag: ${{ github.ref }} |