Skip to content

Merge pull request #141 from InseeFr/i18n/extra-language #45

Merge pull request #141 from InseeFr/i18n/extra-language

Merge pull request #141 from InseeFr/i18n/extra-language #45

name: Release Candidate
on:
push:
branches:
- 'develop'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: yarn
- run: yarn build
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: pearl-jam
path: build
check_if_version_upgraded:
needs: build
runs-on: ubuntu-latest
outputs:
is_upgraded_version: ${{ steps.check.outputs.changed }}
version: ${{ steps.check.outputs.version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Check if version has been updated
id: check
uses: EndBug/version-check@v2
docker:
needs: check_if_version_upgraded
if: needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/download-artifact@v3
with:
name: pearl-jam
path: build
- uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
push: true
context: .
tags: |
inseefr/pearl-jam:latest,
inseefr/pearl-jam:${{ needs.check_if_version_upgraded.outputs.version }}-rc
release:
needs: check_if_version_upgraded
if: needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Get current version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'version'
- run: echo ${{steps.version.outputs.prop}}
- name: Release snapshot
id: release-snapshot
uses: softprops/action-gh-release@v1
with:
name: Release Candidate ${{ needs.check_if_version_upgraded.outputs.version }}
tag_name: ${{ needs.check_if_version_upgraded.outputs.version }}-rc
target_commitish: ${{ github.head_ref || github.ref }}
generate_release_notes: true
draft: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}