From cf800eb5f070f6dc0367e146a06738d2bd2491d6 Mon Sep 17 00:00:00 2001 From: Rian Koja <44759271+RianKoja@users.noreply.github.com> Date: Fri, 16 Oct 2026 13:47:41 -0300 Subject: [PATCH 1/2] Update GitHub Actions to current versions (#6) * Update GitHub Actions to current versions * Mark PDF files as binary to keep byte offsets intact on Windows * Skip existing symbolic links when extracting attachments on Windows --- .gitattributes | 1 + .github/workflows/Build.yml | 31 +++++++++---------------------- src/PDAttachment.jl | 3 +++ 3 files changed, 13 insertions(+), 22 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d72fd52 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.pdf binary diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index b24e950..c51ce23 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -9,7 +9,7 @@ on: jobs: test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.version == 'nightly' }} strategy: @@ -21,43 +21,30 @@ jobs: - 'nightly' os: - ubuntu-latest - arch: - - x64 include: # test macOS and Windows with latest Julia only - os: macOS-latest - arch: x64 version: 1 - os: windows-latest - arch: x64 version: 1 steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v7 + - uses: julia-actions/setup-julia@v3 with: version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- + - uses: julia-actions/cache@v3 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v7 with: - file: lcov.info + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@latest + - uses: actions/checkout@v7 + - uses: julia-actions/setup-julia@v3 with: version: '1' - name: Install dependencies diff --git a/src/PDAttachment.jl b/src/PDAttachment.jl index 26cf9b4..8bdc099 100644 --- a/src/PDAttachment.jl +++ b/src/PDAttachment.jl @@ -66,6 +66,9 @@ function create_new_file(dir::AbstractString, name::String) base, ext = splitext(name) for i = 0:typemax(Int16) path = joinpath(dir, i == 0 ? name : string(base, " (", i, ")", ext)) + # On Windows `O_EXCL` still follows a dangling symbolic link. This check + # does not cover a link created between it and the `open`. + islink(path) && continue try flags = Base.Filesystem.JL_O_WRONLY | Base.Filesystem.JL_O_CREAT | Base.Filesystem.JL_O_EXCL From d9ed19806aef23f0cde94fc88cb31172e392277e Mon Sep 17 00:00:00 2001 From: Rian Koja <44759271+RianKoja@users.noreply.github.com> Date: Wed, 21 Oct 2026 00:04:13 -0300 Subject: [PATCH 2/2] Deploy docs with GITHUB_TOKEN instead of stale DOCUMENTER_KEY * Deploy docs with GITHUB_TOKEN instead of stale DOCUMENTER_KEY The docs job reported success, but deploydocs failed to fetch over SSH because the DOCUMENTER_KEY secret is no longer valid, so gh-pages has not been updated since 2021. Drop DOCUMENTER_KEY so Documenter uses GITHUB_TOKEN, and grant the docs job contents: write. Also point the README Project.toml link at GitHub, since the relative link does not resolve inside the docs build. * Update README Julia requirement to 1.10 to match Project.toml * Add mailto: to README email link so Documenter resolves it --- .github/workflows/Build.yml | 5 +++-- README.md | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index c51ce23..3eec9a3 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -42,6 +42,8 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} docs: runs-on: ubuntu-latest + permissions: + contents: write steps: - uses: actions/checkout@v7 - uses: julia-actions/setup-julia@v3 @@ -51,6 +53,5 @@ jobs: run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - name: Build and deploy env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token - DOCUMENTER_KEY: ${{secrets.DOCUMENTER_KEY}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: julia --project=docs/ docs/make.jl diff --git a/README.md b/README.md index ad35571..5d1aeec 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ The package can be added to a project by the command below: julia> Pkg.add("PDFIO") ``` -The current version of the API requires `julia 1.0`. The detailed list of packages `PDFIO` depends on can be seen in the [Project.toml](Project.toml) file. +The current version of the API requires `julia 1.10`. The detailed list of packages `PDFIO` depends on can be seen in the [Project.toml](https://github.com/sambitdash/PDFIO.jl/blob/master/Project.toml) file. ## Sample Code @@ -251,7 +251,7 @@ Not all PDF files that were used to test the library has been owned by the author. Hence, the author cannot make those files available to general public for distribution under the source code license. However, the author is grateful to the PDF document [library](http://www.stillhq.com/pdfdb/db.html) maintained -by [mikal@stillhq.com](mikal@stillhq.com). However, these files are no longer +by [mikal@stillhq.com](mailto:mikal@stillhq.com). However, these files are no longer available in the link above. Some files are also included from