Skip to content

Release WPT

Release WPT #4

Workflow file for this run

name: Release WPT
on:
workflow_dispatch:
inputs:
ref:
description: 'Commit or branch name to fetch'
default: master
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout WPT
uses: actions/checkout@v4
with:
repository: 'web-platform-tests/wpt'
ref: ${{ inputs.ref }}
- name: Create Github Release
shell: bash
run: |
# Excludes ~70% of files, making this archive faster to process
FILE_FILTER=(':(exclude)css' ':(exclude)html' ':(exclude)conformance-checkers' ':(exclude)svg')
RELEASE_NAME=wpt-$(git rev-parse --short HEAD)
gh release create -R ${{ github.repository }} $RELEASE_NAME || true
git archive --prefix=$RELEASE_NAME/ -o $RELEASE_NAME.tar.gz HEAD $FILE_FILTER
gh release upload -R ${{ github.repository }} $RELEASE_NAME $RELEASE_NAME.tar.gz
env:
GITHUB_TOKEN: ${{ github.TOKEN }}