Skip to content

v5.12.2

v5.12.2 #269

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
docker-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Pull built image
run: docker pull ghcr.io/neinteractiveliterature/intercode:${{ github.sha }}
- name: Tag image with version Tag
run: docker tag ghcr.io/neinteractiveliterature/intercode:${{ github.sha }} ghcr.io/neinteractiveliterature/intercode:${{ github.event.release.name }}
- name: Tag image as latest
run: docker tag ghcr.io/neinteractiveliterature/intercode:${{ github.sha }} ghcr.io/neinteractiveliterature/intercode:latest
- name: Push to registry
run: docker push ghcr.io/neinteractiveliterature/intercode:latest && docker push ghcr.io/neinteractiveliterature/intercode:${{ github.event.release.name }}
# Now do the same for the assets
- name: Pull built image
run: docker pull ghcr.io/neinteractiveliterature/intercode-assets:${{ github.sha }}
- name: Tag image with version Tag
run: docker tag ghcr.io/neinteractiveliterature/intercode-assets:${{ github.sha }} ghcr.io/neinteractiveliterature/intercode-assets:${{ github.event.release.name }}
- name: Tag image as latest
run: docker tag ghcr.io/neinteractiveliterature/intercode-assets:${{ github.sha }} ghcr.io/neinteractiveliterature/intercode-assets:latest
- name: Push to registry
run: docker push ghcr.io/neinteractiveliterature/intercode-assets:latest && docker push ghcr.io/neinteractiveliterature/intercode-assets:${{ github.event.release.name }}
fly-release:
runs-on: ubuntu-latest
needs:
- docker-release
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only -a intercode
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
notify-slack:
runs-on: ubuntu-latest
needs:
- fly-release
steps:
- name: Format release notes for Slack
id: format-release-notes
uses: LoveToKnow/[email protected]
with:
text: ${{ github.event.release.body }}
- name: Post about release to Slack
id: slack
uses: slackapi/[email protected]
with:
method: chat.postMessage
token: ${{ secrets.SLACKTOKEN }}
payload: |
channel: ${{ secrets.SlackCISuccessNotificationChannelID }}
text: "Intercode ${{ github.event.release.name }} released to production"
unfurl_links: false
blocks:
- type: "header"
text:
type: "plain_text"
text: "Intercode ${{ github.event.release.name }} released to production"
- type: "divider"
- type: "section"
text:
type: "mrkdwn"
text: ${{ toJSON(steps.format-release-notes.outputs.text) }}
doc-site-release:
runs-on: ubuntu-latest
steps:
- name: Download built doc site
uses: dawidd6/action-download-artifact@v6
with:
workflow: ci.yml
commit: ${{ github.sha }}
name: doc-site
path: .
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Decompress built site
run: tar xvf doc-site.tar.gz
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc-site/build
cname: intercode.interactiveliterature.org