Skip to content

Release

Release #177

Workflow file for this run

name: Release
on:
schedule:
- cron: '0 0 * * FRI'
workflow_dispatch: {}
jobs:
terraform:
name: Terraform
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v2
- id: 'gcp-auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v0'
with:
create_credentials_file: true
workload_identity_provider: 'projects/76410834219/locations/global/workloadIdentityPools/github-actions/providers/github-actions'
service_account: 'gha-vjftw-cloud-desktops-main@vjp-github-actions.iam.gserviceaccount.com'
- name: Create infrastructure
run: |-
./pleasew -p -v2 run ///third_party/repo/org-infra//build/ci/github:terraform_workspace -- \
apply \
--workspace_name="default" \
--please_target="//deployment/packer:packer"
build:
needs: [terraform]
permissions:
contents: 'read'
id-token: 'write'
strategy:
fail-fast: false
matrix:
flavour:
- arch:xfce4
- debian:xfce4
- debian/kali:xfce4
name: ${{ matrix.flavour }}
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v2
- id: 'gcp-auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v0'
with:
create_credentials_file: true
workload_identity_provider: 'projects/76410834219/locations/global/workloadIdentityPools/github-actions/providers/github-actions'
service_account: 'gha-vjftw-cloud-desktops-main@vjp-github-actions.iam.gserviceaccount.com'
- name: run packer build
run: ./pleasew run "//flavours/${{ matrix.flavour }}_build"
continue-on-error: true
env:
GCP_PROJECT_ID: vjp-cloud-desktops
PACKER_GITHUB_API_TOKEN: ${{ github.token }}
- uses: actions/upload-artifact@v2
continue-on-error: true
with:
name: packer-manifests
path: plz-out/**/packer-manifest.json
- name: make images public
continue-on-error: true
run: ./pleasew run //build:publicise
env:
GCP_PROJECT_ID: vjp-cloud-desktops
publish:
needs: build
permissions:
contents: 'write'
id-token: 'write'
runs-on: ubuntu-latest
steps:
- name: check out code
uses: actions/checkout@v2
- id: 'gcp-auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v0'
with:
create_credentials_file: true
workload_identity_provider: 'projects/76410834219/locations/global/workloadIdentityPools/github-actions/providers/github-actions'
service_account: 'gha-vjftw-cloud-desktops-main@vjp-github-actions.iam.gserviceaccount.com'
- uses: actions/download-artifact@v2
with:
path: plz-out/
- name: Generate Release body
run: ./pleasew run //build:release_body -- ${{ github.workspace }}-RELEASE_BODY.txt
env:
GCP_PROJECT_ID: vjp-cloud-desktops
- name: Compute the release tag
run: |
echo "release_tag=$(./pleasew run //build:version)" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: ${{ github.workspace }}-RELEASE_BODY.txt
target_commitish: main
draft: false
prerelease: false
tag_name: ${{ env.release_tag }}
- name: Update README
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
./pleasew run //build:release_readme