Depsdev improvements #220
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: Publish | |
on: | |
push: | |
tags: | |
- 'v*' | |
branches: | |
- main | |
# Trigger, but do nothing in PRs so we can check that the workflow is valid. | |
pull_request: | |
branches: | |
- main | |
env: | |
PLZ_CONFIG_PROFILE: ci | |
permissions: | |
# Grant the ability to checkout the repository | |
contents: read | |
jobs: | |
pre-release: | |
name: Publish | |
if: github.event_name != 'pull_request' && github.ref_type == 'tag' | |
runs-on: ubuntu-latest | |
permissions: | |
# Grant the ability to create GitHub Releases. | |
contents: write | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Create pre-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./pleasew run //build/releases:pre-release | |
push-docker-images: | |
name: Push Docker images | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
permissions: | |
# Grant the ability to write to GitHub Packages (push Docker images to | |
# GitHub Container Registry). | |
packages: write | |
# Grant the ability to checkout the repository. | |
contents: write | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish Docker images | |
run: ./pleasew run //build/releases:publish-images |