Skip to content

chore: Ported publish jobs from CircleCI to GitHub actions (WIP) #1

chore: Ported publish jobs from CircleCI to GitHub actions (WIP)

chore: Ported publish jobs from CircleCI to GitHub actions (WIP) #1

Workflow file for this run

name: Lambda Layers Publishing CI

Check failure on line 1 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: publish-layers
on:
push:
tags: [master]
workflow_dispatch:
jobs:
publish-node:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18, 20]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}.x
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Check Tag
id: node-check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+(\.[0-9]+)*_nodejs/$ ]]; then
echo "match=true" >> $GITHUB_OUTPUT
fi
- name: Run Node ${{ matrix.node-version }} unit tests
if: steps.node-check-tag.outputs.match == 'true'
run: cd nodejs && npm ci && npm run test
- name: Publish layer
run: make publish-nodejs${{ matrix.node-version }}x-ci
- name: Upload Unit Test Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./nodejs/coverage/unit/lcov.info
fail_ci_if_error: true
flags: unit-tests
publish-python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.7, 3.8, 3.9, 3.10, 3.11, 3.12 ]
steps:
- uses: actions/checkout@v4
- name: Check Tag
id: python-check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+(\.[0-9]+)*_python/$ ]]; then
echo "match=true" >> $GITHUB_OUTPUT
fi
- name: Install python dependencies
if: steps.python-check-tag.outputs.match == 'true'
run: pip install -U awscli
- name: Publish Python ${{ matrix.python-version }} layer
run: |
cd python
./publish-layers.sh python${{ matrix.python-version }}
publish-java:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ java8al2, java11, java17, java21 ]
steps:
- uses: actions/checkout@v4
- name: Check Tag
id: java-check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+(\.[0-9]+)*_java/$ ]]; then
echo "match=true" >> $GITHUB_OUTPUT
fi
- name: Publish ${{ matrix.java-version }} layer
if: steps.java-check-tag.outputs.match == 'true'
run: make publish-${{ matrix.java-version }}-ci
publish-extension:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9 ]
steps:
- uses: actions/checkout@v4
- name: Check Tag
id: extension-check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+(\.[0-9]+)*_extension/$ ]]; then
echo "match=true" >> $GITHUB_OUTPUT
fi
- name: Install publish dependencies
if: steps.extension-check-tag.outputs.match == 'true'
run: pip install -U awscli
- name: Publish extension layer
run: |
cd extension
./publish-layer.sh
publish-layers:
runs-on: ubuntu-latest
if: ${{ always() }}
needs: [publish-node, publish-python, publish-java, publish-extension]