Merge pull request #765 from CleverCloud/release-please--branches--ma… #11
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' | |
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
env: | |
VERSION: ${{ github.ref_name }} | |
CC_CLEVER_TOOLS_RELEASES_CELLAR_KEY_ID: ${{ secrets.CC_CLEVER_TOOLS_RELEASES_CELLAR_KEY_ID }} | |
CC_CLEVER_TOOLS_RELEASES_CELLAR_SECRET_KEY: ${{ secrets.CC_CLEVER_TOOLS_RELEASES_CELLAR_SECRET_KEY }} | |
RPM_GPG_PRIVATE_KEY: ${{ secrets.RPM_GPG_PRIVATE_KEY }} | |
RPM_GPG_NAME: 'Clever Cloud Nexus (rpm)' | |
RPM_GPG_PASS: ${{ secrets.RPM_GPG_PASSPHRASE }} | |
NEXUS_USER: ${{ secrets.NEXUS_USER }} | |
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
jobs: | |
publish_cellar: | |
name: 'Publish' | |
runs-on: ubuntu-latest | |
steps: | |
- name: '[Prepare] Checkout' | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: '[Prepare] Setup Node.js' | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: 'package.json' | |
cache: 'npm' | |
- name: '[Prepare] Install dependencies' | |
run: npm ci | |
- name: '[Prepare] Setup ruby' | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
bundler-cache: true | |
- name: '[Prepare] Install fpm' | |
run: gem install fpm | |
- name: '[Prepare] Setup ssh-agent' | |
uses: webfactory/ssh-agent@v0.8.0 | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- name: '[Build] version ${{ env.VERSION }}' | |
run: node scripts/job-build.js "${VERSION}" --latest --bundle | |
- name: '[Publish] version ${{ env.VERSION }}' | |
run: node scripts/job-publish.js "${VERSION}" | |
- name: '[Publish] Upload artifacts to GitHub Release' | |
shell: bash | |
run: | | |
gh release upload "${VERSION}" $(find build/${{ github.ref_name }}/archive -maxdepth 1 -type f -name "*$VERSION*" -print) | |
gh release upload "${VERSION}" $(find build/${{ github.ref_name }}/bundle -maxdepth 1 -type f -print) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |