Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #105

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #105

---
# This is a basic workflow to help you get started with Actions
name: to-medium-dev-to
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: publish posts on medium
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout code
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.PERSONAL_SUBMODULES_PULL_KEY }}
submodules: recursive
lfs: true
- name: Get All Changed Files
id: files
uses: jitterbit/get-changed-files@v1
- name: Get Post Changed from the all changed files
id: posts
run: |
i=0
for changed_file in ${{ steps.files.outputs.added_modified }}; do
echo "Found changed file in: ${changed_file}."
if [[ "${changed_file}" == "content/post"* ]];
then
echo "File ${changed_file} matched post."
echo "::set-output name=post${i}::${changed_file}"
((i=i+1))
fi
done
- name: Publish to medium
if: steps.posts.outputs.post0
uses: philips-software/[email protected]
with:
integration_token: ${{ secrets.MEDIUM_TOKEN }}
content_format: "markdown"
file: ${{ steps.posts.outputs.post0 }}
publish_status: draft
license: cc-40-by-nc-sa
notify_followers: "false"
canonical_url: https://luiscachog.io
parse_frontmatter: true