name: Build assets and create a release on version tags

on:
  push:
    tags:
      - 'v*.*.*'
jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Inject access token in .npmrc
      run: | 
        echo "registry=https://npm.pkg.github.com/helsingborg-stad" >> ~/.npmrc
        echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc

    - name: Run full build.
      run: php ./build.php --cleanup

    - name: Cleanup .npmrc
      run: rm ~/.npmrc

    - name: Archive Release
      uses: thedoctor0/zip-release@master
      with:
        filename: 'full-release.zip'

    - name: Release
      uses: docker://antonyurchenko/git-release:latest
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        DRAFT_RELEASE: "false"
        PRE_RELEASE: "false"
        CHANGELOG_FILE: "none"
        ALLOW_TAG_PREFIX: "true"
      with:
        args: |
            full-release.zip
name: Build assets and create a release on version tags

on:
  push:
    tags:
      - 'v*.*.*'
jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Setup PHP with composer v2
      uses: shivammathur/setup-php@v2
      with:
        php-version: '7.4'
        tools: composer:v2

    - name: Inject access token in .npmrc
      run: | 
        echo "registry=https://npm.pkg.github.com/helsingborg-stad" >> ~/.npmrc
        echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc

    - name: Run full build.
      run: php ./build.php --cleanup

    - name: Cleanup .npmrc
      run: rm ~/.npmrc

    - name: Archive Release
      uses: thedoctor0/zip-release@master
      with:
        filename: 'full-release.zip'

    - name: Release
      uses: docker://antonyurchenko/git-release:latest
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        DRAFT_RELEASE: "false"
        PRE_RELEASE: "false"
        CHANGELOG_FILE: "none"
        ALLOW_TAG_PREFIX: "true"
      with:
        args: |
            full-release.zip
Make github action workflow use php 7.4
Make github action workflow use php 7.4
