Skip to content

Publish Channel (nightly) #464

Publish Channel (nightly)

Publish Channel (nightly) #464

name: Publish Channel (nightly)
on:
workflow_dispatch:
schedule:
# Publish 1 hour after nightlies start building
- cron: '0 1 * * *'
env:
NIGHTLY_CHANNEL_DIR: ./channel-fuel-nightly.toml.d/
jobs:
publish-channel:
name: Publish channel (nightly)
runs-on: ubuntu-latest
steps:
- name: checkout master
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install build-channel script
run: cargo install --debug --path ./ci/build-channel
- name: Publish nightly channel
id: setup
run: |
PUBLISHED_DATE=$(date +'%Y-%m-%d')
FORMATTED_PUBLISHED_DATE=$(date +'%Y/%m/%d')
mkdir -p ${{ env.NIGHTLY_CHANNEL_DIR }}
CHANNEL_TOML="channel-fuel-nightly.toml"
build-channel --nightly $CHANNEL_TOML $PUBLISHED_DATE --github-run-id $GITHUB_RUN_ID
cp $CHANNEL_TOML ${{ env.NIGHTLY_CHANNEL_DIR }}
echo "::set-output name=archive_dir::channels/nightly/${FORMATTED_PUBLISHED_DATE}"
- name: Deploy nightly channel (latest version)
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.NIGHTLY_CHANNEL_DIR }}
keep_files: true
destination_dir: ./
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
- name: Deploy nightly channel (archive)
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.NIGHTLY_CHANNEL_DIR }}
keep_files: true
destination_dir: ${{ steps.setup.outputs.archive_dir }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'