v1.1.0-beta.21 #68
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: Publish to NPM and auto deploy to dependents | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
deploy: | |
runs-on: ${{ matrix.os }} | |
env: | |
TERM: xterm | |
PRERELEASE_TAG: edge | |
strategy: | |
matrix: | |
os: | |
- ubuntu-24.04 | |
node-version: | |
- '20' | |
# Install deps and cache | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install node ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org | |
cache: npm | |
- name: Install dependencies | |
run: npm clean-install --prefer-offline --frozen-lockfile | |
# Let's do tests rq just to make sure we dont push something that is fundamentally broken | |
- name: Lint code | |
run: npm run lint | |
- name: Run unit tests | |
run: npm run test | |
# Deploy to NPM | |
- name: Export formatted release date | |
run: echo "RELEASE_DATE=$(date -d "${{ github.event.release.published_at }}" "+%B %e, %Y" | tr -s ' ')" >> $GITHUB_ENV | |
- name: Prepare release | |
uses: lando/prepare-release-action@v3 | |
with: | |
sync-email: [email protected] | |
sync-token: ${{ secrets.RTFM47_COAXIUM_INJECTOR }} | |
sync-username: rtfm-47 | |
update-files: CHANGELOG.md | |
update-files-header: | | |
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) | |
update-files-meta: | | |
UNRELEASED_DATE=${{ env.RELEASE_DATE }} | |
UNRELEASED_LINK=${{ github.event.release.html_url }} | |
UNRELEASED_VERSION=${{ github.event.release.tag_name }} | |
- name: Deploy release to npm | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_DEPLOY_TOKEN}} | |
run: | | |
if [ "${{ github.event.release.prerelease }}" == "false" ]; then | |
npm publish --access public --dry-run | |
npm publish --access public | |
echo "::notice title=Published ${{ github.ref_name }} to @${{ github.repository }}::This is a stable release published to the default 'latest' npm tag" | |
else | |
npm publish --access public --tag ${{ env.PRERELEASE_TAG }} --dry-run | |
npm publish --access public --tag ${{ env.PRERELEASE_TAG }} | |
echo "::notice title=Published ${{ github.ref_name }} to @${{ github.repository }}@${{ env.PRERELEASE_TAG }}::This is a pre-release published to the '${{ env.PRERELEASE_TAG }}' npm tag" | |
fi | |
auto-deploy: | |
runs-on: ${{ matrix.os }} | |
needs: deploy | |
env: | |
TERM: xterm | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-24.04 | |
node-version: | |
- '20' | |
auto-deploy-repos: | |
- name: lando/acquia | |
dirs: ./ | |
- name: lando/apache | |
dirs: ./ | |
- name: lando/backdrop | |
dirs: ./ | |
- name: lando/compose | |
dirs: ./ | |
- name: lando/core | |
dirs: ./ | |
- name: lando/core-next | |
dirs: ./ | |
- name: lando/dotnet | |
dirs: ./ | |
- name: lando/drupal | |
dirs: ./ | |
- name: lando/elasticsearch | |
dirs: ./ | |
- name: lando/go | |
dirs: ./ | |
- name: lando/joomla | |
dirs: ./ | |
- name: lando/lagoon | |
dirs: ./ | |
- name: lando/lamp | |
dirs: ./ | |
- name: lando/laravel | |
dirs: ./ | |
- name: lando/lemp | |
dirs: ./ | |
- name: lando/mailhog | |
dirs: ./ | |
- name: lando/mariadb | |
dirs: ./ | |
- name: lando/mean | |
dirs: ./ | |
- name: lando/memcached | |
dirs: ./ | |
- name: lando/mongo | |
dirs: ./ | |
- name: lando/mssql | |
dirs: ./ | |
- name: lando/mysql | |
dirs: ./ | |
- name: lando/nginx | |
dirs: ./ | |
- name: lando/node | |
dirs: ./ | |
- name: lando/pantheon | |
dirs: ./ | |
- name: lando/php | |
dirs: ./ | |
- name: lando/phpmyadmin | |
dirs: ./ | |
- name: lando/platformsh | |
dirs: ./ | |
- name: lando/postgres | |
dirs: ./ | |
- name: lando/python | |
dirs: ./ | |
- name: lando/redis | |
dirs: ./ | |
- name: lando/ruby | |
dirs: ./ | |
- name: lando/setup-lando | |
dirs: ./ | |
- name: lando/symfony | |
dirs: ./ | |
- name: lando/tomcat | |
dirs: ./ | |
- name: lando/solr | |
dirs: ./ | |
- name: lando/varnish | |
dirs: ./ | |
- name: lando/wordpress | |
dirs: ./ | |
steps: | |
# Install deps and cache | |
# NOTE that we use ref: main because we need to get the code that was updated from the prepare-release-action | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: Install node ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org | |
cache: npm | |
- name: Install dependencies | |
run: npm clean-install --prefer-offline --frozen-lockfile | |
# Auto deploy to everything else | |
- name: Auto deploy to ${{ matrix.auto-deploy-repos.name }} | |
uses: lando/auto-deploy-action@v3 | |
with: | |
branch: main | |
slug: ${{ matrix.auto-deploy-repos.name }} | |
token: ${{ secrets.RTFM47_COAXIUM_INJECTOR }} | |
pr: false | |
dirs: ${{ matrix.auto-deploy-repos.dirs }} | |
args: -D |