Timestamp v0.22 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: π Release | |
on: | |
push: | |
tags: [v*] | |
jobs: | |
release: | |
name: π Release | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Setup Perl | |
uses: shogo82148/actions-setup-perl@v1 | |
- name: Install Release Dependencies | |
run: cpanm -qn Module::Build CPAN::Uploader | |
# CPAN | |
- name: Package the Release | |
id: package | |
run: perl Build.PL && ./Build manifest && ./Build dist && echo "tarball=$(./Build tarball_name)" >> $GITHUB_OUTPUT | |
- name: Generate Release Changes | |
run: ./Build latest_changes | |
- name: Release on CPAN | |
env: | |
CPANPASS: ${{ secrets.CPAN_PASSWORD }} | |
CPANUSER: ${{ secrets.CPAN_USERNAME }} | |
run: cpan-upload --user "$CPANUSER" --password "$CPANPASS" '${{ steps.package.outputs.tarball }}' | |
# GitHub | |
- name: Create GitHub Release | |
id: release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body_path: latest_changes.md | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.release.outputs.upload_url }} | |
asset_path: ./${{ steps.package.outputs.tarball }} | |
asset_name: ${{ steps.package.outputs.tarball }} | |
asset_content_type: application/gzip |