Skip to content

Commit

Permalink
Add action create our own WPT archive (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
npaun authored Jan 2, 2025
1 parent d8bce4b commit d6b3ca4
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/wpt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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: |
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 '*.js' '*.json' '*.md'
gh release upload -R ${{ github.repository }} $RELEASE_NAME $RELEASE_NAME.tar.gz
env:
GITHUB_TOKEN: ${{ github.TOKEN }}

0 comments on commit d6b3ca4

Please sign in to comment.