ci: bump Datashare to 17.0.4 #5
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: Tour Plugin - CI | |
on: | |
push: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
DATASHARE_VERSION: '17.0.4' | |
DATASHARE_PACKAGE: 'datashare-17.0.4.deb' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.19.1' | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
- name: Download Datashare for Debian | |
run: wget "https://github.com/ICIJ/datashare-installer/releases/download/${{ env.DATASHARE_VERSION }}/${{ env.DATASHARE_PACKAGE }}" | |
- name: Install Datashare | |
run: sudo apt install -y ./${{ env.DATASHARE_PACKAGE }} | |
- name: Run Datashare in background | |
run: mkdir -p tmp && yarn run test:datashare & | |
- name: Run all tests | |
run: yarn test | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v') | |
env: | |
DATASHARE_VERSION: '16.0.3' | |
DATASHARE_PACKAGE: 'datashare-16.0.3.deb' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.19.1' | |
- name: Install dependencies | |
run: yarn --frozen-lockfile | |
- name: Make distribution | |
run: yarn build | |
- name: Create release assets | |
run: | | |
mkdir datashare-plugin-tour-${{ github.ref_name }} | |
cp package.json datashare-plugin-tour-${{ github.ref_name }} | |
cp -R dist datashare-plugin-tour-${{ github.ref_name }} | |
tar czf datashare-plugin-tour-${{ github.ref_name }}.tgz datashare-plugin-tour-${{ github.ref_name }} | |
zip -r datashare-plugin-tour-${{ github.ref_name }}.zip datashare-plugin-tour-${{ github.ref_name }} | |
- name: Upload release assets | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
datashare-plugin-tour-${{ github.ref_name }}.tgz | |
datashare-plugin-tour-${{ github.ref_name }}.zip |