diff --git a/.github/workflows/chronostratigrafie-publish.yml b/.github/workflows/chronostratigrafie-publish.yml new file mode 100644 index 0000000..8de2c3e --- /dev/null +++ b/.github/workflows/chronostratigrafie-publish.yml @@ -0,0 +1,24 @@ +name: Publish the new Chronostratigrafie RDF to GraphDB/Public + +on: + pull_request: + types: + - closed + +jobs: + publish_gps: + runs-on: ubuntu-latest + + if: "github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'" + + steps: + - name: Checkout the repository + uses: actions/checkout@v3 + + - name: Upload file via PUT to graphdb-gps + env: + FILE_PATH: ./chronostratigrafie.rdf # percorso del file che vuoi caricare + PUT_URL: https://dev-graphdbgps.swissgeol.ch/publish/chronostratigraphy_swisstopo_public_core?context=https://lexic.swissgeol.ch + TOKEN: ${{ secrets.LEXIC_CONTROLLED_VOCABULARIES_GRAPHDB_GPS_TOKEN }} + run: | + curl -X PUT -T $FILE_PATH -H "Authorization: Bearer $TOKEN" $PUT_URL diff --git a/.github/workflows/chronostratigrafie-release.yml b/.github/workflows/chronostratigrafie-release.yml new file mode 100644 index 0000000..a0408dd --- /dev/null +++ b/.github/workflows/chronostratigrafie-release.yml @@ -0,0 +1,26 @@ +name: Create a GitHub Release for the new version of Chronostratigrafie + +on: + pull_request: + types: + - closed + +jobs: + create_release: + permissions: write-all + runs-on: ubuntu-latest + + if: "github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'" + + steps: + - name: Checkout the repository + uses: actions/checkout@v4 + + - name: Create the GitHub Release + uses: ncipollo/release-action@v1 + with: + name: ${{ github.event.pull_request.title }} + body: ${{ github.event.pull_request.body }} + tag: v${{ github.event.pull_request.number }} + commit: ${{ github.event.pull_request.merge_commit_sha }} + makeLatest: true