Skip to content

standardize cache keys for rustup and cargo deps across workflows (#309) #414

standardize cache keys for rustup and cargo deps across workflows (#309)

standardize cache keys for rustup and cargo deps across workflows (#309) #414

Workflow file for this run

name: release
on:
push:
branches:
- main
- "release/*"
tags:
- "*"
pull_request:
branches:
- "release/*"
workflow_dispatch:
concurrency:
group: release-${{ github.head_ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:

Check failure on line 23 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 23, Col: 3): Error calling workflow 'joshuadavidthomas/django-language-server/.github/workflows/build.yml@66d2a7c3c1dfc99e2c6802e161e2313430abc472'. The workflow is requesting 'contents: read', but is only allowed 'contents: none'.
uses: ./.github/workflows/build.yml
permissions:
id-token: write
attestations: write
with:
version: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || '' }}
test:
uses: ./.github/workflows/test.yml
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
with:
os: "macos-latest,ubuntu-latest,windows-latest"
release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [build, test]
environment: release
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/download-artifact@v5
- name: Publish to PyPI
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380
with:
command: upload
args: --non-interactive --skip-existing wheels-*/*
- name: Upload release assets to GitHub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_NAME: ${{ github.ref_name }}
run: |
gh release upload "${TAG_NAME}" binary-*/*