rocky-logos/.github/workflows/main.yml

43 lines
1.4 KiB
YAML

---
name: 'Release Formatting'
on:
push:
tags:
- '*'
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Extract tag name
id: tag
uses: actions/github-script@0.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
return context.payload.ref.replace(/\/refs\/tags\//, '');
- name: Build source artifact
run: |
mkdir -p ../rocky-logos-${{ steps.tag.outputs.result }} &&
cp -r . ../rocky-logos-${{ steps.tag.outputs.result }} &&
mv ../rocky-logos-${{ steps.tag.outputs.result }} . &&
tar cfj rocky-logos-${{ steps.tag.outputs.result }}.tar.xz rocky-logos-${{ steps.tag.outputs.result }}
- name: Publish artifact
uses: actions/upload-artifact@v2.2.3
with:
name: rocky-logos-${{ steps.tag.outputs.result }}.tar.xz
path: rocky-logos-${{ steps.tag.outputs.result }}.tar.xz
- name: Generate release
uses: docker://antonyurchenko/git-release:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_RELEASE: "false"
PRE_RELEASE: "false"
CHANGELOG_FILE: "none"
ALLOW_EMPTY_CHANGELOG: "false"
ALLOW_TAG_PREFIX: "true"
with:
args: |
rocky-logos-${{ steps.tag.outputs.result }}.tar.xz