diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml index b14a575c..15b4449a 100644 --- a/.github/actions/setup-node/action.yml +++ b/.github/actions/setup-node/action.yml @@ -1,12 +1,12 @@ name: Setup Node -description: Setup Node from .nvmrc and yarn install +description: Setup Node from .nvmrc runs: using: composite steps: - name: Read Node version from .nvmrc shell: bash - run: echo ::set-output name=NVMRC::$(cat .nvmrc) + run: echo "name=NVMRC::$(cat .nvmrc)" >> $GITHUB_OUTPUT id: nvm - name: Set up Node.js diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 28863c77..f8e8714e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,6 +55,21 @@ jobs: ${{ env.CSC_LINK }} - name: Setup Node uses: ./.github/actions/setup-node + # >> NO Secrets + - name: Temp NO_SECRETS as .env file + run: | + touch ${{ github.run_id }}_${{ github.sha }}.env + echo "${{ secrets.NO_SECRETS }}" >> ${{ github.run_id }}_${{ github.sha }}.env + - name: Convert dotenv as output + id: nosecrets + uses: falti/dotenv-action@v1 + with: + path: ${{ github.run_id }}_${{ github.sha }}.env + log-variables: true + mask-variables: false + - name: Remove temp .env file + run: rm -rf ${{ github.run_id }}_${{ github.sha }}.env + # << NO Secrets - name: Yarn install env: npm_config_build_from_source: true @@ -75,20 +90,20 @@ jobs: # override because of "env-ci" used by semantic-release # GITHUB_REF should not be default branch when "workflow_run" event is triggered export GITHUB_REF=$GITHUB_REF_OVERRIDE - echo ::set-output name=current-version::$(node -e "console.log(require('./package.json').version)") + echo "current-version=$(node -e "console.log(require('./package.json').version)")" >> $GITHUB_OUTPUT yarn semantic-release - echo ::set-output name=next-version::$(node -e "console.log(require('./package.json').version)") + echo "next-version=$(node -e "console.log(require('./package.json').version)")" >> $GITHUB_OUTPUT yarn compile --no-progress env: ARCHIFILTRE_RELEASE_MODE: version - TRACKER_MATOMO_ID_SITE: ${{ secrets.TRACKER_MATOMO_ID_SITE }} + TRACKER_MATOMO_ID_SITE: ${{ steps.nosecrets.outputs.tracker_matomo_id_site }} + TRACKER_PROVIDER: ${{ steps.nosecrets.outputs.tracker_provider }} + SENTRY_ORG: ${{ steps.nosecrets.outputs.sentry_org }} TRACKER_MATOMO_URL: ${{ secrets.TRACKER_MATOMO_URL }} - TRACKER_PROVIDER: ${{ secrets.TRACKER_PROVIDER }} TRACKER_POSTHOG_API_KEY: ${{ secrets.TRACKER_POSTHOG_API_KEY }} TRACKER_POSTHOG_URL: ${{ secrets.TRACKER_POSTHOG_URL }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ secrets.SENTRY_ORG }} SENTRY_URL: ${{ secrets.SENTRY_URL }} - name: Archive dist uses: actions/upload-artifact@v2