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

45 lines
1.3 KiB
YAML
Raw Normal View History

2021-05-02 00:43:11 +00:00
---
name: 'Release Formatting'
2021-05-02 01:09:33 +00:00
on:
push:
tags:
- '*'
2021-05-02 00:43:11 +00:00
jobs:
package:
runs-on: ubuntu-latest
steps:
2021-12-06 02:13:04 +00:00
- name: Checkout
uses: actions/checkout@v2
- name: Extract tag name
id: tag
uses: actions/github-script@0.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
2021-05-08 22:44:01 +00:00
return context.payload.ref
.replace(/\/refs\/tags\//, '')
.replace(/refs\/tags\//, '');
2021-12-06 02:13:04 +00:00
2021-05-02 00:49:19 +00:00
- name: Build source artifact
2021-05-02 00:56:36 +00:00
run: |
mkdir -p ../rocky-logos-${{ steps.tag.outputs.result }} &&
cp -r . ../rocky-logos-${{ steps.tag.outputs.result }} &&
mv ../rocky-logos-${{ steps.tag.outputs.result }} . &&
2021-05-08 22:44:01 +00:00
tar cfJ rocky-logos-${{ steps.tag.outputs.result }}.tar.xz rocky-logos-${{ steps.tag.outputs.result }}
2021-12-06 02:13:04 +00:00
2021-05-02 01:09:33 +00:00
- name: Generate release
2021-12-06 02:13:04 +00:00
uses: docker://antonyurchenko/git-release:v3
2021-05-02 01:09:33 +00:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_RELEASE: "false"
PRE_RELEASE: "false"
CHANGELOG_FILE: "none"
ALLOW_EMPTY_CHANGELOG: "false"
2021-12-06 02:13:04 +00:00
ALLOW_TAG_PREFIX: "true"
#TAG_PREFIX_REGEX: '(0|[1-9]\d*)?'
2021-05-02 01:09:33 +00:00
with:
args: |
rocky-logos-${{ steps.tag.outputs.result }}.tar.xz