mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
copy-release-assets: add workflow
This commit is contained in:
parent
3c01532748
commit
4da50c10c0
1 changed files with 31 additions and 0 deletions
31
.github/workflows/copy-release-assets.yml
vendored
Normal file
31
.github/workflows/copy-release-assets.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
name: Copy assets to the new release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: published
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Copy assets to the new release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download and upload
|
||||
run: |
|
||||
LATEST="$(git describe --tags --abbrev=0)"
|
||||
PREVIOUS="$(git describe --tags --abbrev=0 "$LATEST"^)"
|
||||
|
||||
mkdir release-assets && cd release-assets
|
||||
|
||||
gh release download "$PREVIOUS"
|
||||
gh release upload "$LATEST" -- *
|
Loading…
Add table
Reference in a new issue