mirror of
https://ghproxy.net/https://github.com/fairpm/fair-plugin.git
synced 2025-09-13 00:57:06 +08:00
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
on:
|
|
push:
|
|
tags:
|
|
- "**"
|
|
|
|
name: Upload Release Asset
|
|
|
|
jobs:
|
|
build:
|
|
name: Upload Release Asset
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
attestations: write
|
|
id-token: write
|
|
contents: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@master
|
|
|
|
- name: Get tag
|
|
id: tag
|
|
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Build project
|
|
run: git archive -o /tmp/${{ github.event.repository.name }}-${{ steps.tag.outputs.tag }}.zip --prefix=${{ github.event.repository.name }}/ ${{ steps.tag.outputs.tag }}
|
|
|
|
- name: Create WP distribution files
|
|
run: bin/bundle.sh
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: softprops/action-gh-release@v2
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
files: |
|
|
/tmp/${{ github.event.repository.name }}-${{ steps.tag.outputs.tag }}.zip
|
|
/tmp/fair-dist/*
|
|
|
|
- name: Build provenance attestation
|
|
uses: actions/attest-build-provenance@v2
|
|
with:
|
|
subject-path: /tmp/${{ github.event.repository.name }}-${{ steps.tag.outputs.tag }}.zip
|