v2.0.36 #56
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: | |
release: | |
types: | |
- created | |
env: | |
CI: true | |
jobs: | |
build: | |
permissions: | |
id-token: write | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get the version | |
id: get_version | |
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
- name: Release version | |
run: | | |
echo $RELEASE_VERSION | |
echo ${{ env.RELEASE_VERSION }} | |
- name: Set Timezone | |
uses: szenius/[email protected] | |
with: | |
timezoneLinux: "Europe/Amsterdam" | |
timezoneMacos: "Europe/Amsterdam" | |
timezoneWindows: "Europe/Amsterdam" | |
- name: Get current date | |
id: date | |
run: echo "CURRENT_DATETIME=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV | |
- name: Microsoft Teams | |
uses: aliencube/[email protected] | |
with: | |
webhook_uri: ${{secrets.TEAMS_WEBHOOK}} | |
title: New release - FDMG CSS Grid ${{ env.RELEASE_VERSION }} | |
summary: New release FDMG CSS Grid ${{ env.RELEASE_VERSION }} from commit ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} | |
theme_color: '237ef4' | |
sections: '[{ "activityTitle": "FDMG CSS Grid", "facts": [ {"name": "When", "value": "${{ env.CURRENT_DATETIME }}" }, { "name": "Triggered by:", "value": "${{ github.actor }}" }, { "name": "Repository:", "value": "${{ github.repository }}" }, { "name": "Version:", "value": "${{ env.RELEASE_VERSION }}" } ] }]' | |
actions: '[{ "@type": "OpenUri", "name": "View job", "targets": [{ "os": "default", "uri": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" }] }, { "@type": "OpenUri", "name": "Changelog", "targets": [{ "os": "default", "uri": "${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ env.RELEASE_VERSION }}" }] }, { "@type": "OpenUri", "name": "Commit", "targets": [{ "os": "default", "uri": "${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}" }] }, { "@type": "OpenUri", "name": "GitHub", "targets": [{ "os": "default", "uri": "${{ github.server_url }}/${{ github.repository }}" }] }]' | |
- name: Use Node.js (NPMJS) ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
always-auth: true | |
registry-url: 'https://registry.npmjs.org' | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build:ci --if-present | |
- name: Publish NPMJS @fdmg | |
if: contains(github.ref, 'canary') == false | |
run: npm publish --provenance ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} | |
continue-on-error: true | |
- name: Publish NPMJS @fdmg (canary) | |
if: contains(github.ref, 'canary') | |
run: npm publish --tag next --provenance ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} | |
continue-on-error: true | |
- name: Use specific package.json for GHP | |
run: cp ./dist/package.github.json ./dist/package.json | |
- name: Publish NPMJS @fdmediagroep | |
if: contains(github.ref, 'canary') == false | |
run: npm publish --provenance ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} | |
continue-on-error: true | |
- name: Publish NPMJS @fdmediagroep (canary) | |
if: contains(github.ref, 'canary') | |
run: npm publish --tag next --provenance ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} | |
continue-on-error: true | |
- name: Use Node.js (GitHub) ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
always-auth: true | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@FDMediagroep' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish GPR | |
if: contains(github.ref, 'canary') == false | |
run: npm publish --provenance ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
continue-on-error: true | |
- name: Publish GPR (canary) | |
if: contains(github.ref, 'canary') | |
run: npm publish --tag next --provenance ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
continue-on-error: true | |