Generated v6.10 #43
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 CI | |
on: | |
push: | |
tags: | |
# This looks like a regex, but it's actually a filter pattern | |
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | |
- 'release/v?[0-9]+.[0-9]+' | |
- 'release/v?[0-9]+.[0-9]+-dry' | |
- 'release/v?[0-9]+.[0-9]+-trial[0-9]+' | |
- 'release/v?[0-9]+.[0-9]+-trial[0-9]+-dry' | |
env: | |
GITHUB_REF_NAME: ${{ github.ref_name }} | |
jobs: | |
publish: | |
name: Publish to CPAN | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
path: main | |
- name: Set up environment variables | |
run: ./.github/scripts/publish_env.sh >> $GITHUB_ENV | |
working-directory: ./main | |
shell: bash | |
- name: Setup cpanm, milla, and cpan-upload | |
uses: perl-actions/install-with-cpanm@v1 | |
with: | |
install: | | |
Dist::Milla | |
CPAN::Uploader | |
- name: Pack API client | |
run: ./.github/scripts/pack.sh | |
working-directory: ./main | |
shell: bash | |
- name: Auth with CPAN | |
run: | | |
echo "user FASTLY" > ~/.pause | |
echo "password ${{ secrets.CPAN_PUBLISH_TOKEN }}" >> ~/.pause | |
shell: bash | |
- name: Publish API client | |
run: ./.github/scripts/publish.sh | |
working-directory: ./main | |
shell: bash | |
- name: Write release body file | |
run: CODE_PATH=./main ./main/.github/scripts/release_body.sh > ./dist/release_body.txt | |
shell: bash | |
- name: Create release (dry run) | |
if: ${{ env.DRY_RUN == '1' }} | |
run: cat ./dist/release_body.txt | |
- name: Create GitHub release | |
if: ${{ env.DRY_RUN != '1' }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: ${{ env.VERSION_TITLE }} | |
body_path: ./dist/release_body.txt | |
files: | | |
./dist/${{ env.PACKAGE_FILENAME }} | |
draft: false | |
prerelease: ${{ env.PUBLISH_TAG != 'latest' }} |