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

52 lines
1.5 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-12-06 02:25:53 +00:00
- name: Generate Release
2021-12-06 02:35:31 +00:00
uses: ncipollo/release-action@v1
2021-05-02 01:09:33 +00:00
with:
2021-12-06 02:35:31 +00:00
token: "${{ secrets.GITHUB_TOKEN }}"
2021-12-06 02:25:53 +00:00
prerelease: false
2021-12-06 02:39:58 +00:00
artifacts: "*.tar.xz"
2021-12-06 02:25:53 +00:00
# - name: Generate release
# uses: docker://antonyurchenko/git-release:v3
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DRAFT_RELEASE: "false"
# PRE_RELEASE: "false"
# CHANGELOG_FILE: "none"
# ALLOW_EMPTY_CHANGELOG: "false"
# ALLOW_TAG_PREFIX: "true"
# #TAG_PREFIX_REGEX: '(0|[1-9]\d*)?'
# with:
# args: |
# rocky-logos-${{ steps.tag.outputs.result }}.tar.xz